Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Word Image AlternativeText
#1
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.

Code:
Copy      Help
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


Forum Jump:


Users browsing this thread: 1 Guest(s)