Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 1.74 KB

Publisher.PictureFormat.OriginalWidth.md

File metadata and controls

67 lines (42 loc) · 1.74 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PictureFormat.OriginalWidth property (Publisher)
vbapb10.chm3604777
vbapb10.chm3604777
Publisher.PictureFormat.OriginalWidth
3c418f3f-b2af-3176-9a37-a548b15fb4bc
06/13/2019
medium

PictureFormat.OriginalWidth property (Publisher)

Returns a Variant that represents, in points, the width of the specified linked picture or OLE object. Read-only.

Syntax

expression.OriginalWidth

expression A variable that represents a PictureFormat object.

Return value

Variant

Remarks

This property applies only 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 Type property of the Shape object
  • The IsLinked property of the PictureFormat object

Example

The following example tests each picture in the active publication, and returns 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 "Vertical Scaling: " & .VerticalScale & "%" 
 Debug.Print "Original Image Width: " & .OriginalWidth & " points" 
 Debug.Print "Width in publication: " & .Width & " points" 
 
 End With 
 End If 
 Next shpLoop 
Next pgLoop 

[!includeSupport and feedback]