Hyperlink.CreateNewDocument Method (PowerPoint)

Creates a new Web presentation associated with the specified hyperlink.

Syntax

expression. CreateNewDocument( _FileName_, _EditNow_, _Overwrite_ )

expression A variable that represents a Hyperlink object.

Parameters

Name Required/Optional Data Type Description
FileName Required String The path and file name of the document.
EditNow Required MsoTriState Determines whether the document is opened immediately in its associated editor.
Overwrite Required MsoTriState Determines whether any existing file of the same name in the same folder is overwritten.

Return Value

Nothing

Example

This example creates a new Web presentation to be associated with hyperlink one on slide one. The new presentation is called Brittany.ppt, and it overwrites any file of the same name in the HTMLPres folder. The new presentation document is loaded into Microsoft PowerPoint immediately for editing.

ActivePresentation.Slides(1).Hyperlinks(1).CreateNewDocument _ 
    FileName:="C:\HTMLPres\Brittany.ppt", _ 
    EditNow:=msoTrue, _ 
    Overwrite:=msoTrue

See also

Hyperlink Object