Create Method

Microsoft Publisher Visual Basic

Create Method

Creates a new PageBackground object for the specified Page object.

expression.Create

expression    Required. An expression that returns a PageBackground object.

Remarks

Use PageBackground.Exists to test if a page already has a background before trying to create a new one. Returns a "Permission denied' error if a background already exists.

Example

The following example tests for the existence of a bckground on the first page of the active document. If a background does not exist then one is created.

    If ActiveDocument.Pages(1).Background.Exists = False Then
    ActiveDocument.Pages(1).Background.Create
End If