![]() |
|
#4
|
|||
|
|||
|
Based on the clock, the mysterious one may have signed off for the day. It is elegant. I particularly like the lbl_Exit: Exit Sub part.
Code:
Sub Macro1()
Dim oRng As Range
Dim strText As String
Dim lngIndex As Long
Set oRng = ActiveDocument.Range
lngIndex = 1
With oRng.Find
While .Execute(FindText:="\[\[(*)\]\]", _
MatchWildcards:=True, _
ReplaceWith:="\1")
ActiveDocument.Footnotes.Add oRng, CStr(lngIndex), oRng.Text
lngIndex = lngIndex + 1
oRng.Text = vbNullString
oRng.Collapse 0
Wend
End With
lbl_Exit:
Set oRng = Nothing
Exit Sub
End Sub
'http://gregmaxey.com/word_tip_pages/convert_reference_notes_to_dynamic_footnotes.html A collaborative effort with Macropod. |
| Tags |
| footnotes, vba |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Word 2013 does not search text in footnotes unless I first click in a footnote
|
amz | Word | 1 | 11-18-2015 01:56 PM |
word 2007 - footnotes and text box
|
glggluig | Word | 1 | 08-10-2014 04:09 AM |
| Putting text in color shapes | dianabanana | Word | 1 | 04-07-2014 08:07 PM |
Putting text to Excel
|
Leandro | Office | 2 | 03-01-2012 11:51 PM |
| Selecting the macro document | lars | Word VBA | 0 | 08-19-2010 06:06 AM |