View Single Post
 
Old 03-10-2015, 10:30 AM
ciresuark ciresuark is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Oct 2014
Posts: 7
ciresuark is on a distinguished road
Default VBA for content controls

I am using the following code to update fields in a document. I am using an IF formula based upon a combo box.

Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
    Selection.WholeStory
    Selection.Fields.Update  
End Sub
Few questions.
1. Is it possible to set up VBA to only function on one content control in a letter?
2. With the code above the whole document is selected, and remains highlighted after the fields update. Is there code to remove the highlighting the document, like a click of the mouse?

Thank you for your assistance.
Reply With Quote