Replace Period with Hyphen

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Replace Period with Hyphen

Post by Sundog »

In Word 2007, for figure titles in Appendix A that now read this way: "Figure A.1 Title", the author wants them to read "Figure A-1 Title". That is, replace the period after A with a hyphen.

Prior to a section break that starts the Appendix, figure titles read like this: "Figure 1. Title", so I can't just change what the Insert Caption command does.

When I try to do this using Find and Replace, if I put "Figure A." in the Find box, and in the Replace box put "Figure A-"; or "Figure A^=" or Figure A^~" using the Special list; in all three cases, the Find box entry changes to match the Replace box entry.

Is VB needed here? (If so, move to VBA forum?)
Sundog

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Replace Period with Hyphen

Post by Sundog »

I finessed it by searching for "Figure A." and used the Clipboard to paste "Figure A-", many times, so it's not urgent. But I would like to know if there's a VB workaround.
Sundog

User avatar
HansV
Administrator
Posts: 78628
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Replace Period with Hyphen

Post by HansV »

I'd create a new label with the desired formatting (click New Label... in the Insert Caption dialog), and use that for the figures in the appendices.
Best wishes,
Hans