HasFile Property
Applies To
Subdocument object.
Description
True if the specified subdocument has been saved to a file. Read-only Boolean.
See Also
Name property, Path property, PathSeparator property.
Example
This example displays the file name of each subdocument in the active document. The example also displays a message for each subdocument that hasn't been saved.
For Each subdoc In ActiveDocument.Subdocuments
subdoc.Range.Select
If subdoc.HasFile = True Then
MsgBox subdoc.Path & Application.PathSeparator & subdoc.Name
Else
MsgBox "This subdocument has not been saved."
End If
Next subdoc