View Single Post
  #17   Report Post  
Posted to microsoft.public.word.docmanagement
David Newmarch David Newmarch is offline
external usenet poster
 
Posts: 45
Default Wildcard to Find and Replace with fields?

Many thanks Graham. It works like a charm.

This is the second macro you've provided for me in the last couple of weeks,
and it has been an excellent learning curve studying how the VBA pans out.
I'm very grateful to you for that.

Would I be going too far out out of line to ask if you could extend this
piece of code to perform one further operation?

Once the spaces to the left of a citation's insertion point have been
removed I then want to search for any commas or full stops (only commas or
full stops) that come immediately to the right of the insertion point (that
would be to the right of the field's closing curly bracket), and move them to
a new position immediately to the left of the citation. Possibly this should
be a separate operation but I think it would be safe enough to do it all in
one shot with a single macro.

What these two operations will in effect accomplish is to tidy up the
puctuation for conversion of an in-text author-date citation style like APA,
where the citation is entered inside a comma or full stop, to a citation
style using superscript numbered citations that must follow a comma or
full-stop (in this case a superscript version of the Vancouver style that is
common in medical publications). A macro that does it all in one click would
be a very handy little tool.

The author of the paper I'm editing originally wrote it for an APA-style
journal, then decided to switch and send it to a medical-style journal.
EndNote will change the form of the citations for you, but it doesn't have a
way to shift their location.