Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2022, 10:51 PM
gmayor's Avatar
gmayor gmayor is offline VB Script using Content Control Windows 10 VB Script using Content Control Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default


The code references are to lower case so
Code:
Case Is = "ComSystem"
is never going to be true

Use instead
Code:
Case Is = "comsystem"
Similarly
Code:
If InStr(1, LCase(ContentControl.Range.Text), "test") > 0 Then
There doesn't appear to be a content control titled "BVW" in the document?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 01-14-2022, 01:02 AM
gsfousteris gsfousteris is offline VB Script using Content Control Windows 10 VB Script using Content Control Office 2019
Novice
VB Script using Content Control
 
Join Date: Dec 2021
Posts: 5
gsfousteris is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
The code references are to lower case so
Code:
Case Is = "ComSystem"
is never going to be true

Use instead
Code:
Case Is = "comsystem"
Similarly
Code:
If InStr(1, LCase(ContentControl.Range.Text), "test") > 0 Then
There doesn't appear to be a content control titled "BVW" in the document?
Yeeeees! You really rock and thanks for your valuable assistance. It worked perfectly.

One last question, as the "comsystem" value comes from an automated script and there is no manual intervention to word document, i see that unless i press anywhere in the doc, content control checkboxes are not updated.
Is there any suggestion, to be updated while "Save as" or "Export" are automatically hitted?
Reply With Quote
Reply

Tags
content control events, vba combobox, vba word



Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Script using Content Control Change Value of a Content Control based on the value of another content Control jsc_msoffice Word VBA 2 05-21-2021 09:51 PM
VB Script using Content Control Content Control Dropdowns - How to duplicate the content control and allow a second choice ashleyf Word VBA 2 03-19-2020 09:11 AM
Content Control content deleted when re-uploading to SharePoint Peterson Word 5 06-27-2018 08:13 PM
VB Script using Content Control Clicking the selected Content Control checkbox returns wrong control in vba event DougsGraphics Word VBA 2 06-24-2015 07:31 AM
VB Script using Content Control Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:02 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