Share via

Possible formatting bug when using Custom Properties in Word 2007

Anonymous
2010-01-21T09:23:41+00:00

Yesterday we discovered a very strange problem when we were working on a Word 2007 document. It occurs when using custom properties with a value that contains several spaces.

This is how you can reproduce the error:

  1. Create a new blank document
  2. Add a new Custom property to the document. I set the name of the property to "Customer" and its default text to "<Customer>"
  3. Insert this custom property at any location in the document
  4. Mark the property and change its font size to something smaller than the font size of the "Normal" style.
  5. Edit the property and change its text to the following text: "this is the value"
  6. Right click the property in the document and choose "Update field"

Now things appear very strange. It seems that Word breaks the formatting after the second space in the text I wrote. I can consistently reproduce this error and I have done so on several of my colleagues computers.

Any idea of what the problem might be?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Jay Freedman 207.7K Reputation points Volunteer Moderator
2010-01-21T19:06:34+00:00

I'm not able to reproduce the behavior you saw, but I can suggest a way to prevent the problem.

Right-click the property in the document and choose Toggle Field Codes. You'll probably see

   { DOCPROPERTY Customer \*MERGEFORMAT }

Change the word MERGEFORMAT to CHARFORMAT. Select at least the first character in DOCPROPERTY and apply the formatting you want the result to have. Then update the field.

Read this page for explanation of the field formatting switches.


Jay Freedman MS Word MVP

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful