0

In word, I'm using docvariables to manage pluralization. A VBA macro is changing the value of several docvariables to pluralize / singularize them.

But sometimes I want to use a Docvariable only for enable/disable a 's' suffix.

Problem: I cannot set it to empty string, because it deletes the docvariable. The field displays an error in word.

So I'm searching a way to achieve this, it could be :

  • A way to keep a Docvariable existing, with empty string or equivalent value
  • A field formula which make this job if the variable doesn't exist

Any other workaround would be appreciated.

Thank you

Alsatian
  • 3,086
  • 4
  • 25
  • 40

1 Answers1

1

A Document Variable (used in DocVariable field codes) cannot exist if it has no content.

A possibility would be to also store the space in this DocVariable so that it display s[space] or just [space].

Otherwise you may need to write this information to a Bookmark (possibly using a Set field) and display the content using a Ref field.

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43