PublishFileName Property

Microsoft Publisher Visual Basic

PublishFileName Property

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    Required. An expression that returns a WebPageOptions object.

Remarks

Specifying a file name for a Web page is optional. When a publication is saved as filtered html, Publisher automatically generates file names 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 only used when a publication is saved as filtered html.

File names must be specified without a file extension.

Including invalid characters (such as characters that are not universally allowed in file names that are part of URLs) in the file name will generate 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 the active publication is a web publication with at least two pages.

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