Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / November 2006

Tip: Looking for answers? Try searching our database.

Capture ruler values?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
caten - 13 Nov 2006 01:24 GMT
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?
John Wilson - 13 Nov 2006 09:28 GMT
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
Signature

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

> 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
[quoted text clipped - 13 lines]
>
> Am I missing something?  Is there any way to do what I want to do?
caten - 13 Nov 2006 18:16 GMT
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.

> This would change the indents for level one text placeholder on a title /
> text layout.
[quoted text clipped - 22 lines]
> >
> > Am I missing something?  Is there any way to do what I want to do?
Steve Rindsberg - 13 Nov 2006 20:01 GMT
> 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?  

> > This would change the indents for level one text placeholder on a title /
> > text layout.
[quoted text clipped - 22 lines]
> > >
> > > Am I missing something?  Is there any way to do what I want to do?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
caten - 14 Nov 2006 16:33 GMT
Is there any way for me to post my file (or at least an image of what I'm
trying to get at)?

> > 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.
[quoted text clipped - 4 lines]
> If this isn't what you want, it's not clear what specific ruler values you're
> after.  Can you explain more?
Steve Rindsberg - 14 Nov 2006 22:01 GMT
> 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.

> > > 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.
[quoted text clipped - 4 lines]
> > If this isn't what you want, it's not clear what specific ruler values you're
> > after.  Can you explain more?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
caten - 15 Nov 2006 19:53 GMT
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?
Steve Rindsberg - 15 Nov 2006 22:15 GMT
> 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
[quoted text clipped - 8 lines]
> 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.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.