Visio Save as Web query

  • Thread starter James Price at Premier
  • Start date
J

James Price at Premier

I’m using Visio 2007 VBA to automate Save as Web Page.

Sub saveAsWebPage()
Dim saveAsWeb As VisSaveAsWeb
Dim webSettings As IVisWebPageSettings

Set saveAsWeb = New VisSaveAsWeb
Set webSettings = saveAsWeb.WebPageSettings
Set webSettings = saveAsWeb.WebPageSettings
' Configure the preferences.
webSettings.StartPage = 1
webSettings.EndPage = ThisDocument.Pages.Count - 1
webSettings.LongFileNames = True
webSettings.TargetPath = "c:\WardManDemo.htm"
webSettings.SilentMode = True

saveAsWeb.CreatePages

End Sub

This works fine except that when I re-run the macro the web page (internet
Explorer 7) only updates when I press the refresh button. Is there a line of
code I 've missed above that will do this for me?

Many thanks

James
 
J

John Goldsmith_Visio_MVP

Hi James,

SilentMode overrides the default (True) for OpenBrowser. If you use
QuietMode instead (of Silent) then the user only sees the page generation
progress bars, but no other dialogs, plus OpenBrowser will then default to
True and so the page will be displayed and updated.

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
 
J

James Price at Premier

Thanks John. You're a star

James


John Goldsmith_Visio_MVP said:
Hi James,

SilentMode overrides the default (True) for OpenBrowser. If you use
QuietMode instead (of Silent) then the user only sees the page generation
progress bars, but no other dialogs, plus OpenBrowser will then default to
True and so the page will be displayed and updated.

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
 

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