Table of contents
Collapse the table of content
Expand the table of content

WebPageOptions.PublishFileName Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Returns or sets a String that represents the file name of a Web page (within a Web publication) that is being saved as filtered HTML.


expression. PublishFileName

_expression_A variable that represents a WebPageOptions object.

Return Value



Specifying a file name for a Web page is optional. When a publication is saved as filtered HTML, Microsoft Publisher automatically generates a file name for any Web page that does not have a file name specified. Use the SaveAs method of the Document object to save a publication as filtered HTML.

User-defined file names are used only when a publication is saved as filtered HTML.

File names must be specified without a file name extension.

Including invalid characters (such as characters that are not universally allowed in file names that are part of URLs) in the file name generates a run-time error. Invalid characters include:

  • characters with a code point value of below (decimal) 48

  • any double-byte characters

  • the following symbols: , ?, >, <, |, : , and .

This property corresponds to the File name text box in the Publish to the Web section of the Web Page Options dialog box.


The following example sets the file name and description of the second page in the active publication. The example assumes the active publication is a Web publication containing at least two pages.

With ActiveDocument.Pages(2).WebPageOptions 
 .PublishFileName = "CompanyProfile" 
 .Description = "Tailspin Toys Company Profile" 
End With
© 2018 Microsoft