AutoFit through VBA

G

Guest

Hi

Is there a means to access the AutoFit behaviour from VBA in PowerPoint 2003?

I'm adding a number of links using:


sldCurrent.Shapes.Placeholders(2).TextFrame.TextRange.Paragraphs(intLinkOnSlide).Text = strLessonArray(intCurrentLink, 2) & Chr(13)

sldCurrent.Shapes.Placeholders(2).TextFrame.TextRange.ParagraphFormat.Bullet.Visible = False
With
sldCurrent.Shapes.Placeholders(2).TextFrame.TextRange.Paragraphs(intLinkOnSlide).ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.Address = "modules/" & strLessonArray(intCurrentLink, 1)
& ".ppt"
End With

This works fine but if there are too many lines, the text runs off the
bottom of the placeholder. I couldn't find a way either to confirm that the
relevant AutoCorrect options are activated or to change an AutoFit property
on the placeholder or text frame object. Nothing gets recorded if you make a
macro of changing the AutoFormat As You Type options or the AutoFit Options
smart tag results in a blank, but if anyone has any ideas...

Thanks
 
S

Steve Rindsberg

Hi,
Is there a means to access the AutoFit behaviour from VBA in PowerPoint 2003?

Afraid not. The AutoFit options along with quite a few other options settings
are stored in

HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\PowerPoint\Options
(where xx.00 = 11.0 for Office 2003, 10.0 for Office 2002, etc.)

PowerPoint reads these settings at startup only, so while you can change the
setting during the PPT session, PPT won't see the changes.

PowerPoint writes its internally held copy of the settings back to the registry
at shutdown, so changes you make during a session will be overwritten when PPT
quits.

An external program that runs before or after PowerPoint could make the needed
changes.


I'm adding a number of links using:
sldCurrent.Shapes.Placeholders(2).TextFrame.TextRange.Paragraphs(intLinkOnSlide)
.Text = strLessonArray(intCurrentLink, 2) & Chr(13)sldCurrent.Shapes.Placeholders(2).TextFrame.TextRange.ParagraphFormat.Bullet.Vis
ible = False
 

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