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?
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
"James Price at Premier" <JamesPriceatPremier@discussions.microsoft.com>
wrote in message news:9929F9B5-A6BE-4C86-9D6B-41E10FEED21D@microsoft.com...
> 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
> 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
>
>
> "James Price at Premier" <JamesPriceatPremier@discussions.microsoft.com>
> wrote in message news:9929F9B5-A6BE-4C86-9D6B-41E10FEED21D@microsoft.com...
> > 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
>
>