Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting embedded objects 1

Status
Not open for further replies.

wmbb

Technical User
Jul 17, 2005
320
NL
I've created a word 2010 document with embedded files (insert-object...) displayed as an icon
I need to select these icons within a macro to exclude them for protection.
Is it possible to select these file-icons with VBA ?
 
Try:
Code:
Sub Demo()
Dim Fld As Field
For Each Fld In ActiveDocument.Fields
  If Fld.Type = wdFieldEmbed Then
    Fld.Result.Editors.Add wdEditorEveryone
  End If
Next
End Sub

Cheers
Paul Edstein
[MS MVP - Word]
 
Thanx, this is exactly what I wanted.
A star for you !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top