Macro_learner
New Member
- Joined
- May 13, 2024
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Good morning,
I searched the web for an answer, tested few but without success. Please move this to the correct forum if needed.
I have a PowerPoint with several slides, each with one or more pictures linked to saved png files.
They were added using this path:
Insert Tab / Pictures / This Device / *select picture png* / Insert and link
Once the PowerPoint is ready I want to run a Macro to break the links of these pictures.
I tried the VBA below and some variations but it doesn't work.
I'm new to VBA so I assume the issue is that these "linked pictures" are not "msoPlaceholder", but I can't fine online what other "mso*" exists or what ".type" is a linked picture.
Hope someone can help me.
Thanks.
I searched the web for an answer, tested few but without success. Please move this to the correct forum if needed.
I have a PowerPoint with several slides, each with one or more pictures linked to saved png files.
They were added using this path:
Insert Tab / Pictures / This Device / *select picture png* / Insert and link
Once the PowerPoint is ready I want to run a Macro to break the links of these pictures.
I tried the VBA below and some variations but it doesn't work.
I'm new to VBA so I assume the issue is that these "linked pictures" are not "msoPlaceholder", but I can't fine online what other "mso*" exists or what ".type" is a linked picture.
VBA Code:
Sub BreakAllLinks()
Dim oSld As Slide
Dim oSh As Shape
For Each oSld In ActivePresentation.Slides
For Each oSh In oSld.Shapes
If oSh.Type = msoPlaceholder Then
oSh.LinkFormat.BreakLink
End If
Next ' Shape
Next ' Slide
End Sub
Hope someone can help me.
Thanks.