View Single Post
Old 03-13-2011, 11:21 AM
Biofodder Biofodder is offline Windows Vista Office 2010 32bit
Join Date: Mar 2011
Posts: 1
Biofodder is on a distinguished road
Default Complete beginner needs some help.

Hi. I am new to the forum and VBA in general and i really need some help. I am converting a whole bunch of .doc files, using Word 2007 to web pages and I am trying to build a macro to populate all of the alt text fields for all of the images in my word document with the same data. It sounds like a silly thing to do, I know, but I just need to set up placeholder data for another person to populate with more detailed information later.

The documents I am working on have 500+ images each so this would save me hours worth of time. I really am not sure where to start though. This is as far as I got before i realised I really had no idea what i was doing.

Sub Macro1()
Dim x As InlineShape
    For Each x In ActiveDocument.InlineShapes
        If x.AlternativeText <> "" Then
        x.AlternativeText = "test"
        End If
End Sub
Obviously it doesn't work, but I really don't know why. Any help would be greatly appreciated.
Reply With Quote