AddFromFile Method

See Also         Example         Applies To

Adds the specified subdocument to the master document at the start of the selection and returns a Subdocument object.

Note   If the active view isn't either outline view or master document view, an error occurs.

Syntax

expression.AddFromFile(Name, ConfirmConversions, ReadOnly, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate)

expression   Required. An expression that returns a Subdocuments object.

Name   Required String. The file name of the subdocument to be inserted into the master document.

ConfirmConversions   Optional Variant. True to confirm file conversion in the Convert File dialog box if the file isn't in Word format.

ReadOnly   Optional Variant. True to insert the subdocument as a read-only document.

PasswordDocument   Optional Variant. The password required to open the subdocument if it's password protected.

PasswordTemplate   Optional Variant. The password required to open the template attached to the subdocument if the template is password protected.

Revert   Optional Variant. Controls what happens if Name is the file name of an open document. True to insert the saved version of the subdocument. False to insert the open version of the subdocument, which may contain unsaved changes.

WritePasswordDocument   Optional Variant. The password required to save changes to the document file if it's write protected.

WritePasswordTemplate   Optional Variant. The password required to save changes to the template attached to the subdocument if the template is write protected.