04-22-2013, 09:06 PM
I'm a newbie and this is my first post.
I have a macro developed by someone who has left the company. It's purpose is to replace an image in a folder of 100+ word documents.
I want to also add AlternativeText to the image but I can't seem to find any reference on the web that describe which property I need to use to set it.
Your help would be most welcome.
Cheers,
Narlo
I have a macro developed by someone who has left the company. It's purpose is to replace an image in a folder of 100+ word documents.
Sub ChangePic()
Dim oFile
oFile = Dir("O:\STUDIO\Brit\Forms-Unpacked\Forms-Unpacked\*.doc")
Do While oFile <> ""
Application.Documents.Open FileName:="O:\STUDIO\Brit\Forms-Unpacked\Forms-Unpacked\" & oFile
With Selection
.GoTo what:=wdGoToGraphic, Count:=1
.Delete
.InlineShapes.AddPicture FileName:="O:\STUDIO\Brit\Logo\dynamic.png"
End With
If ActiveDocument.Saved = False Then ActiveDocument.Save
ActiveDocument.Close
oFile = Dir
Loop
End Sub
I want to also add AlternativeText to the image but I can't seem to find any reference on the web that describe which property I need to use to set it.
Your help would be most welcome.
Cheers,
Narlo