![]() |
#4
|
||||
|
||||
![]()
The line in question writes the text from the content control to a customdocument property called "Sbjct". If that document property doesn't exist you will get an error (hence the comment two lines before this one).
Alternatively you could change the document property references to document variables (and use docvariable fields to display the variable content) e.g. Code:
Case "Sbjct": ActiveDocument.Variables("Sbjct").Value = ContentControl.Range.Text Code:
Case "Sbjct" If Not ContentControl.Range.Text = "" _ And Not ContentControl.Range.Text = ContentControl.PlaceholderText Then ActiveDocument.Variables("Sbjct").Value = ContentControl.Range.Text End If
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
dhare | Excel Programming | 2 | 02-24-2016 12:36 PM |
Help!! Dropdown List | christo16 | Word | 1 | 06-29-2015 05:18 AM |
combining 2 or more columns of numerical data or text data | heartdoc | Excel | 0 | 12-03-2014 10:57 PM |
Populate dropdown list with data from Access table | spw4000 | Office | 0 | 02-24-2012 05:22 AM |
Using fields to repeat data throughout a document | Brasada | Word | 0 | 07-20-2010 02:37 PM |