PathForPictures Property

       

Returns or sets a String that represents the default path for picture files. Read/write.

expression.PathForPictures

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the path for picture files.

Sub SetPicturePath()
    Options.PathForPictures = "C:\Graphics"
End Sub

This example places the default path for picture files in a string and then uses the path string to add the specified file to the active publication.

Sub InsertNewPicture()
    Dim strPicPath As String

    strPicPath = Options.PathForPictures

    ActiveDocument.Pages(1).Shapes.AddPicture FileName:=strPicPath _
        & "sample.jpg", LinktoFile:=msoFalse, _
        SaveWithDocument:=msoTrue, Left:=50, Top:=50, Height:=200

End Sub