I'm trying to cross-refer a figure and apply some simple formatting to the cross-reference like this:

...as shown in Fig._{ REF _Ref30011011 \# "0,_c" \h }.

which should result in

...as shown in Fig._12,_c.

where the '_' symbol is NBSP.

Unfortunately, the result is

...as shown in Fig._12,c.

At least it's become non-breaking.

I've tried using { SYMBOL } field like

...as shown in Fig._{ REF _Ref30011011 \# "0,{ SYMBOL 160 }c" \h }.

and { SET } field like

{ SET NBSP "_"}
...as shown in Fig._{ REF _Ref30011011 \# "0,{ NBSP }c" \h }.

but nothing changed.

So the question is: is there a way to preserve NBSP that is used in the \# formatting switch?

1 Answer 1


Not a good answer, but the only solution I've been able to find so far is to use Word's Replace using wildcards after updating the fields:

FindWhat:="(Fig. *,)(?)"

ReplaceWith:="\1" & chr(160) & "\2"

Then, I created a class module for document events, declaring an object variable for the application Public WithEvents oApp As Word.Application, and creating the event procedure Private Sub oApp_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean) in which I invoke the replacements.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .