EndPage Property [Visio 2003 SDK Documentation]
Specifies the page number of the last page in the range when you save a range of pages as a Web page. Returns Long. Read/write Long.
retLong = object.EndPage
object.EndPage = longVal
retLongLong. The current end number of the range of pages that you specify to save as a Web page.
object Required. An expression that returns a VisWebPageSettings object.
longVal Required Long. The new end number of the range of pages that you specify to save as a Web page.
Remarks
The start page number is specified in the StartPage property.
The EndPage property value corresponds to the value in the to box on the General tab of the Save As Web Page dialog box (on the File menu, click Save as Web Page, and then click Publish).
Example
The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the EndPage property to save a range of pages in a drawing (in this case, from page 2 to page 3) as a Web page instead of the complete drawing.
This macro assumes that the current Visio drawing contains at least three pages.
Before running this macro, replace path\filename.htm with a valid target path on your computer and the filename that you want to assign to your Web page.
Public Sub EndPage_Example()
Dim vsoSaveAsWeb As VisSaveAsWeb
Dim vsoWebSettings As VisWebPageSettings
Set vsoSaveAsWeb = Visio.Application.SaveAsWebObject
Set vsoWebSettings = vsoSaveAsWeb.WebPageSettings
With vsoWebSettings
.StartPage = 2
.EndPage = 3
.TargetPath = "path\filename.htm"
End With
vsoSaveAsWeb.CreatePages
End Sub
Applies to | VisWebPageSettings Object
See Also | StartPage Property