Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 01-16-2018, 12:26 PM
warbird warbird is offline VBA Assign Checkbox Content Control Symbols Windows 7 64bit VBA Assign Checkbox Content Control Symbols Office 2010 64bit
Novice
VBA Assign Checkbox Content Control Symbols
 
Join Date: Jun 2015
Posts: 13
warbird is on a distinguished road
Default

Using Greg's example I created this:
Code:
Private Sub SetCheckSymbol()
Dim oCC As ContentControl
For Each oCC In ActiveDocument.Range.ContentControls
  If oCC.Type = wdContentControlCheckBox Then
    If oCC.Tag = "RateDot" Then
      oCC.SetCheckedSymbol CharacterNumber:=152, Font:="Wingdings 2"
      oCC.SetUncheckedSymbol CharacterNumber:=153, Font:="Wingdings 2"
    ElseIf oCC.Tag = "ChkBox" Or "CarryCk" Then
      oCC.SetCheckedSymbol CharacterNumber:=82, Font:="Wingdings 2"
      oCC.SetUncheckedSymbol CharacterNumber:=163, Font:="Wingdings 2"
    End If
  End If
Next
Exit Sub
End Sub
It worked the first time or two but now gives a "Type Mismatch" error. It's not critical to the document function, just a loose end that doesn't make sense.

I have streamlined most of the code and replaced some of the VBA with XML binding. My form has been much more stable and responsive. It hasn't locked up the whole application recently.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Assign Checkbox Content Control Symbols One Content Control Checkbox checks another Content Control Checkbox DEsh Word VBA 2 10-06-2017 08:23 PM
VBA Assign Checkbox Content Control Symbols Content control checkbox calculations allikat305 Word Tables 5 11-22-2016 11:20 PM
VBA Assign Checkbox Content Control Symbols Clicking the selected Content Control checkbox returns wrong control in vba event DougsGraphics Word VBA 2 06-24-2015 07:31 AM
VBA Assign Checkbox Content Control Symbols Replace checkbox symbol with check box content control canadansk Word VBA 5 04-01-2015 08:21 AM
VBA Assign Checkbox Content Control Symbols Assign a value to a Content Control SuzeG Word VBA 10 12-08-2013 08:04 AM

Other Forums: Access Forums

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