Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-10-2015, 10:30 AM
ciresuark ciresuark is offline VBA for content controls Windows 7 32bit VBA for content controls Office 2010 32bit
Novice
VBA for content controls
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA for content controls VBA to set Content controls as non printing Sammie0Sue Word VBA 21 01-12-2021 04:44 PM
Calculate Age From Content Controls kintap Word VBA 10 07-02-2014 09:25 AM
Content Controls in Headers ejungk99 Word 2 06-16-2014 04:02 PM
VBA for content controls Content Controls Sammie0Sue Word 6 11-06-2013 10:56 PM
VBA for content controls Grouping Content Controls cksm4 Word VBA 2 03-01-2011 12:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft