View Single Post
 
Old 06-14-2012, 06:42 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,342
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Eric,

You could use a macro like:
Code:
Sub Demo()
Dim StrTxt As String
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "\(*\)"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = True
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute
  End With
  Do While .Find.Found
    StrTxt = Mid(.Duplicate.Text, 2, Len(.Duplicate.Text) - 2)
    .Text = vbNullString
    .Footnotes.Add Range:=.Duplicate, Text:=StrTxt
    .Find.Execute
  Loop
End With
End Sub
As for vba coding resources, there are many web sites with tutorials, and you might one or two of them worth doing. Most are probably for Excel, though.

For a book, you might try something like 'The Secret Life of Word: A Professional Writer's Guide to Microsoft
Word Automation' by R Delwood. This isn't a programming book, per se, and doesn't profess to teach you how to program. Rather, it shows how to combine Word's various tools (including vba) to achieve whatever the desried result might be. The only reason I can suggest this book is that I did much of the technical review; I'm sure there are plenty of others out there. Another that I contributed to is 'Word Hacks', by A Savikas, but that one pre-dates Office 2007.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote