WebPageOptions.PublishFileName property (Publisher)

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

Syntax

expression.PublishFileName

expression A variable that represents a WebPageOptions object.

Return value

String

Remarks

Specifying a file name for a webpage is optional. When a publication is saved as filtered HTML, Microsoft Publisher automatically generates a file name for any webpage 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.

Example

The following example sets the file name and description of the second page in the active publication. The example assumes that 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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.