Table of contents
Collapse the table of content
Expand the table of content

PictureFormat.OriginalFileSize Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Returns a Long representing the size, in bytes, of the linked picture or OLE object. Read-only.


expression. OriginalFileSize

_expression_A variable that represents an PictureFormat object.


This property only applies to linked pictures. Returns "Permission Denied" for shapes representing embedded or pasted pictures.

Use either of the following properties to determine whether a shape represents a linked picture:


The following example tests each picture in the active publication, and prints selected image properties for pictures that are linked.

Dim pgLoop As Page 
Dim shpLoop As Shape 

For Each pgLoop In ActiveDocument.Pages 
 For Each shpLoop In pgLoop.Shapes 
 If shpLoop.Type = pbLinkedPicture Then 

 With shpLoop.PictureFormat 

 Debug.Print "File Name: " &; .Filename 
 Debug.Print "Original File Size: " &; .OriginalFileSize &; " bytes" 

 End With 
 End If 
 Next shpLoop 
Next pgLoop 
© 2018 Microsoft