GefImageFormat.PictureFile (property)

Gets and sets the name of the file to be used for displaying Image.
Syntax: String = object.PictureFile
object.PictureFile = String
Description:

We can change the ImageFile of PictureObject using this property, In case if its an embedded picture object (InsertAsLink = false) Then the path of the file returned could be Invalid.
For relative paths to work we may need to set the current directory using ChDir command before setting the PictureFile


Example:

Sub GefImageFormat_PictureFile()
    
    Dim oCimObj As GefObject
    Dim oCimImageFmt As GefImageFormat
    
    Set oCimObj = CimGetObject
    Set oCimImageFmt = oCimObj.ImageFormat
    If Not oCimImageFmt Is Nothing Then
         oCimImageFmt.PictureFile = "C:\MyImages\MyImage.Jpg"
         CimGetScreen.Refresh False
    End If
    
End Sub