Capture ruler values?

G

Guest

I am trying to write a macro that will copy text and formatting from a
NotesPage text box, delete the text box, replace the NotesPage Body
placeholder, and paste the copied formatted text into the Body placeholder.
(If I could simply *convert* a text box to a Body placeholder, I could avoid
this, but that does not seem to be possible.)

I have accomplished most of it, but I need information that I can see on the
Ruler but can't seem to access. I have some paragraphs that are bullet
items. The Ruler displays the upper marker in position 1 and the lower
marker in position 2 (which makes my bulleted paragraphs slightly indented
with a hanging indent).

I tried getting the Ruler.Levels and various ParagraphFormat properties
including the Bullet properties but no luck. I also tried copy and Paste
Special formatted text, but nothing seems to capture the information I need.

Am I missing something? Is there any way to do what I want to do?
 
G

Guest

This would change the indents for level one text placeholder on a title /
text layout.

With ActivePresentation.Slides(1).Shapes _
..Placeholders(2).TextFrame.Ruler.Levels(1)
..FirstMargin = 40
..LeftMargin = 40
End With
--
Did that answer the question / help?
___________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk
 
G

Guest

No, I know how to set levels but (1) the levels aren't what I'm interested in
and (2) this doesn't tell me what the current ruler values are.
 
S

Steve Rindsberg

No, I know how to set levels but (1) the levels aren't what I'm interested in
and (2) this doesn't tell me what the current ruler values are.

The .FirstMargin and .LeftMargin properties for each .Level are the values that
control the indents.

If this isn't what you want, it's not clear what specific ruler values you're
after. Can you explain more?
 
G

Guest

Is there any way for me to post my file (or at least an image of what I'm
trying to get at)?
 
S

Steve Rindsberg

Is there any way for me to post my file (or at least an image of what I'm
trying to get at)?

That'd be a good idea; if you have a web site, pop it up there and post the URL so
we can grab it.
 
G

Guest

Okay, I have figured out how to capture the ruler values that I want to
reproduce (both tab stops and levels, it turns out). And I found an example
of getting and setting tab stops here: http://www.pptfaq.com/FAQ00794.htm
but I keep getting an error message:
"Run-time error '9': Subscript out of range", which occurs on the line "For
x = 1 To UBound(atabs, 2)".

I thought maybe it was a 0-based vs. 1-based counting issue, but I added 5
more tab stops (so there were a total of 6) and I get the same error.

I checked the Visual Basic Help about arrays and UBound, but I can't figure
out what the problem is. Any ideas?
 
S

Steve Rindsberg

Okay, I have figured out how to capture the ruler values that I want to
reproduce (both tab stops and levels, it turns out). And I found an example
of getting and setting tab stops here: http://www.pptfaq.com/FAQ00794.htm
but I keep getting an error message:
"Run-time error '9': Subscript out of range", which occurs on the line "For
x = 1 To UBound(atabs, 2)".

I thought maybe it was a 0-based vs. 1-based counting issue, but I added 5
more tab stops (so there were a total of 6) and I get the same error.

I checked the Visual Basic Help about arrays and UBound, but I can't figure
out what the problem is. Any ideas?

When I run the code exactly as posted, it works fine here; I'm guessing you
may've incorporated it into a larger chunk of code. It'd help if you could
post the whole works, or at least enough that we can see what's going on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top