View Single Post
 
Old 11-17-2014, 12:42 AM
ghumdinger ghumdinger is offline Windows 7 Office 2010 (Version 14.0)
Advanced Beginner
 
Join Date: Jul 2010
Posts: 64
ghumdinger is on a distinguished road
Default Convert manual cross references in footnotes to other footnotes to automatic cross references

I am trying to devise a workflow to convert manual cross references in footnotes to other footnotes to automatic cross references. Due to a limitation in Word's Find and Replace in replacing with field codes, I am stuck. I understand that Find and Replace opertions can be performed with a macro without the limitation.

I have very limited ability in VBA coding, and I appreciate any help I can get.

My workflow comrpises of the following steps:

1. Make bookmarks of all footnote references in the body text using a modified version of the macro posted by MattP at wordbanter at http://www.wordbanter.com/showthread.php?t=124842)

The bookmarks created are named "Bookmark 1", "Bookmark 2" and so on and match the numbering of the footnote reference.

2. Now I need to replace all instances of the manual cross refs in the footnotes with the { FTNREF Bookmark X } field code. The manual cross refs follow this notation consistently: "see n X".

The problem is that Word's Find and Replace only recognize the field opening and closing braces "^d" in the Find box, but not in the Replace box.

The best I can do is to copy the "{FTNREF Bookmark" field (it this partial form) to clipboard, and then replace "see n" with "^c".

But I need the number that comes after the "see n" to be within the field code after "Bookmark". So for e.g. "see n 8", would be replaced with "{FTNREF Bookmark8}". The problem is that after I replace replace "see n" with "^c", the number that comes after "see n" is outside of the "{FTNREF Bookmark" field code.

Can anyone help with a macro to do such a find and replace operation?


Thanks.
Reply With Quote