Stopping updatelinks dialog when ppt opened invisibly through vba

G

Guest

Hello Experts,

I have a .ppt file. I use the powerpoint application object in vba code to
print them silently without even getting them displayed in any window.

All the things work fine, except for the case of files having the links
(with the ppt having the property of automatic update for the links).

In this case, the user is shown an "update links" dialog. Is there anyway to
avoid this dialog from showing up.

Is there a way to avoid them for ppt. For example, in the case of excel
applicaiton object, in the "open" method, we have the property updatelinks
and setting it to zero, makes it possible that the user is not shown any
dialog box.

I certainly know the following solutions: User manually setting the links to
manual update or after the presentation is opened, use a macro to set the
links to manual update.

What I would like to know is a programmatic way to avoid this dialog in the
opening of ppt files.

Any pointers towards this would be greatly appreciated.

Thanks in advance,
Mohan
 
G

Guest

Hello Shyam,

Your reply is very encouraging to me since it gives me the hint that it may
be possible.

This is the code that I am using. Please do advise me how to improve this,
so that the "updatelinks" dialog does not come up during the opening of the
ppt.

The dialog comes with three options. Update Links, Cancel and Help. The
focus is by default on "Cancel". If there is someway to tell powerpoint to
choose the "Cancel" by default (so that the dialog does not popup), rather
than the user giving the input, then it would be able to solve this issue.

Thanks in advance,
Mohan

The default option of the

Sub Macro1()

Set oPpt = CreateObject("Powerpoint.Application")

On Error GoTo ErrorHandler

With oPpt

.DisplayAlerts = ppAlertsNone

.Presentations.Open FileName:="C:\test.ppt", WithWindow:=msoFalse

With .Presentations("test")

With .PrintOptions
.NumberOfCopies = 1
.PrintInBackground = False
End With

.PrintOut
.Saved = True
.Close
End With

.DisplayAlerts = ppAlertsAll

ErrorHandler:
.Quit

End With

Set oPpt = Nothing

End Sub
 
G

Guest

Hello Glenna Shaw,

Thanks for pointing me to this link.

I have seen some of the resources mentioned by this page already. But, I
haven't come across a page that given me a hint to avoid the dialog for
"update links" popping up, while automating ppt.

Regards,
Mohan
 

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