Question

Folks -

I am looking for a way to address and manipulate "picture" links in powerpoint. These links are distinct from the type of object created when linking another Microsoft (MS) object. These are charts, cell ranges in Excel, or text ranges in Word. Selecting a a MS object yields:

Application.ActiveWindow.Selection.Type = msoLinkedOLEObject 'true

However, when inserting a picture -which is what I'm concerned about- (Insert>Picture>Insert and Link) yields:

Application.ActiveWindow.Selection.Type = msoCallout 'true

Running:

ActivePresentation.UpdateLinks or Object.LinkFormat.Update

works for OLE objects, but not for these "other" type of links.

I need to be able to 1) identify these objects (msoCallout is also used for other non-linked objects, so that's not helpful) 2) update the links and 3) modify the link path

Was it helpful?

Solution

You're getting misleading information there. You want to look at:

ActiveWindow.Selection.ShapeRange(1).Type 

instead. You'll find it's 11, msoLinkedPicture

And this gives you the path to the linked picture:

With ActiveWindow.Selection.ShapeRange(1)
    Debug.Print .LinkFormat.SourceFullName
End With
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top