S
Sven Weindel
Hi all,
I want to automate the function 'SaveAsWebPage' with a macro.
Unfortunately I can't record the single work steps (File -> SaveAsWebPage) -
after the record I see only the Sub <Name> and EndSub - statement.
After search in the web and VisioHelp I found the function
'SaveAsWebObject' - perhaps this is the responsible function for that.
Unfortunately I can't run the example function, because 2 object (?) types
(in detail: IVisSaveAsWeb and IVisWebPageSettings) are inexistent in my
Visio2003 version (with VB 6.3 and VBA 6.499.72).
In Detail here the example:
-----------------------------------------------------------------------
Public Sub SaveAsWebObject_Example()
Dim vsoApplication As Application
Call SaveAsWeb(vsoApplication)
End Sub
Private Public Sub SaveAsWeb(vsoApplication As Visio.Application)
Dim objSaveAsWeb As IVisSaveAsWeb
Dim objWebPageSettings As IVisWebPageSettings
'Get a VisSaveAsWeb object that represents a new Web page project
Set objSaveAsWeb = Application.SaveAsWebObject
'Get a VisWebPageSettings object
Set objWebPageSettings = objSaveAsWeb.WebPageSettings
'Configure Web-page settings
objWebPageSettings.StartPage = 1
objWebPageSettings.EndPage = 2
objWebPageSettings.LongFileNames = True
objWebPageSettings.TargetPath = "\path\filename"
End Sub
-----------------------------------------------------------------------
Can anybody help me with my problem?
Thanks in advance & regards,
Sven
I want to automate the function 'SaveAsWebPage' with a macro.
Unfortunately I can't record the single work steps (File -> SaveAsWebPage) -
after the record I see only the Sub <Name> and EndSub - statement.
After search in the web and VisioHelp I found the function
'SaveAsWebObject' - perhaps this is the responsible function for that.
Unfortunately I can't run the example function, because 2 object (?) types
(in detail: IVisSaveAsWeb and IVisWebPageSettings) are inexistent in my
Visio2003 version (with VB 6.3 and VBA 6.499.72).
In Detail here the example:
-----------------------------------------------------------------------
Public Sub SaveAsWebObject_Example()
Dim vsoApplication As Application
Call SaveAsWeb(vsoApplication)
End Sub
Private Public Sub SaveAsWeb(vsoApplication As Visio.Application)
Dim objSaveAsWeb As IVisSaveAsWeb
Dim objWebPageSettings As IVisWebPageSettings
'Get a VisSaveAsWeb object that represents a new Web page project
Set objSaveAsWeb = Application.SaveAsWebObject
'Get a VisWebPageSettings object
Set objWebPageSettings = objSaveAsWeb.WebPageSettings
'Configure Web-page settings
objWebPageSettings.StartPage = 1
objWebPageSettings.EndPage = 2
objWebPageSettings.LongFileNames = True
objWebPageSettings.TargetPath = "\path\filename"
End Sub
-----------------------------------------------------------------------
Can anybody help me with my problem?
Thanks in advance & regards,
Sven