#1
|
|||
|
|||
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. Code:
Sub Macro1() Dim x As InlineShape For Each x In ActiveDocument.InlineShapes If x.AlternativeText <> "" Then x.AlternativeText = "test" End If Next End Sub |
#2
|
||||
|
||||
Hi biofodder,
Your code works fine. You can test it with: Code:
Sub Test() Dim x As InlineShape For Each x In ActiveDocument.InlineShapes MsgBox x.AlternativeText Next End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HELP...Beginner | Leeroy4022 | Word VBA | 2 | 02-25-2011 02:16 AM |
Advancing Slide After Animation is complete | scottv1001 | PowerPoint | 0 | 10-06-2010 02:46 PM |
Creating Forms for users to complete | dalaurienzo | Word | 1 | 07-19-2010 04:12 PM |
Using Office to complete and print Forms. | eJames | Office | 2 | 01-08-2010 08:09 AM |
Just a beginner...be nice please! | Tommy Gun | Project | 1 | 02-18-2009 03:06 AM |