|
Question : Word VBA, Loop through all words in a document
|
|
Using VBA for Word, how do I loop through all the "Words" in the Active document?
I've used this in Access, but don't know the synatx for Word.
I'm thinking it should look something like this:
Sub Loop() Dim wd as Word for each wd in ActiveDocument 'Do Something Next wd End Sub
I'm guessing I could use something like "Loop Until End of Document"
but I still nee th correct Word syntax fo a "Word"
I hope I have made myself clear
|
|
Answer : Word VBA, Loop through all words in a document
|
|
Done it again. Typed it all in a few hours ago. Come back to check & find that I haven't submitted it.
I don't know why your weekday name is one day out. To get around you could do this.
.Text = Format$(DateAdd("d", 1, .Text), "dddd, ") & Format$(.Text, "mmmm, dd yy")
|
|
|
|