I have a Word document with pictures that are linked. I want to embed them to the word document, but I do not want to do it manually.
Manually going to: File --> edit links to files --> selecting and hitting "break link" does exactly what I want to do.
I found some VBA code for breaking links to fields, but that does not help to break the links to my pictures. Here is the code that I tried:
For Each objField In ActiveDocument.Fields
If Not objField.LinkFormat Is Nothing Then
objField.LinkFormat.Update
objField.LinkFormat.BreakLink
ActiveDocument.UndoClear
End If
Next
When I hit Alt + F9 in my document to display fields nothing happends to my pictures, but other fields (links etc) is expanded/displayed. I therefore assume that these picture links are something else than "fields".
How can I break these picture links in VBA?
Edit Note The word document is basically a html file. That is what you get by opening a .html file in Word.
For Each Field In ActiveDocument.Fields MsgBox (Field.Type) Next Field
Resolved field types by looking up WdFieldType Enumeration