View Single Post
  #5   Report Post  
Doug Robbins
 
Posts: n/a
Default

That should all be one line of code. Unfortunately, the mail program has
inserted a linebreak that does not conform to the visual basic line break
character.

Just delete the carriage return at the end of the first line so that the
second line becomes part of the first.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Heather" wrote in message
news
Thank you for this.

I am getting a compile error, syntax error at this line in the macro....

ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab &
aendnote.Range

Any thoughts on how to fix this? I do not use macros much.

Thank you!
Heather

"Doug Robbins" wrote:

You could modify the following macro so that it by replacing endnote with
footnote and run it on the mailmerge main document to them to ordinary
text
so that they do not change.

' Macro created 29/09/99 by Doug Robbins to replace endnotes with
textnotes
at end of document

' to replace the endnote reference in the body of the document with a
superscript number.

'

Dim aendnote As Endnote

For Each aendnote In ActiveDocument.Endnotes

ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab &
aendnote.Range

aendnote.Reference.InsertBefore "a" & aendnote.Index & "a"

Next aendnote

For Each aendnote In ActiveDocument.Endnotes

aendnote.Reference.Delete

Next aendnote

Selection.Find.ClearFormatting

Selection.Find.Replacement.ClearFormatting

With Selection.Find.Replacement.Font

.Superscript = True

End With

With Selection.Find

.Text = "(a)([0-9]{1,})(a)"

.Replacement.Text = "\2"

.Forward = True

.Wrap = wdFindContinue

.Format = True

.MatchWildcards = True

End With

Selection.Find.Execute Replace:=wdReplaceAll

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Heather" wrote in message
...
I have letter with two footnotes that I am using in a mail merge. They
are
numbered 1 and 2. When I complete the mail merge the footnote numbers
increase on the 2nd letter generated by the mail merge to 3 and 4.
Then
on
the third letter generated, to 5 and 6, and so on throughout the whole
mail
merged document.

How can I make the footnote numbers static in the mail merge document?
I
need them to be numbered 1 and 2 on all the letters generated by the
mail
merge.

Thanks for your help.
Heather