![]() |
|
#2
|
||||
|
||||
|
I'm not sure what your first code block has to do with add a DOCPROPERTY field to a document. The correct syntax to add a DOCPROPERTY field is:
Code:
ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ Text:="DOCPROPERTY FirstTest1Custom", PreserveFormatting:=True
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Change in font size of docproperty
|
Sandy27 | Word | 9 | 01-03-2014 01:51 PM |
Trying to Reference a ContentControl Using DocProperty
|
SuzeG | Word VBA | 4 | 12-17-2013 03:40 PM |
| Using DocProperty Field Codes multiple times in the same document | trueimage | Word | 2 | 09-18-2013 04:44 PM |
| Field DOCPROPERTY LastSavedTime format problem | ragesz | Word | 4 | 10-29-2012 06:58 AM |
| My plain text post got converted to rich text in a reply, how to convert it back? | david.karr | Outlook | 0 | 01-05-2012 09:46 AM |