-
Thanks guys, for pointing me in the right direction. Once again I learned some new things!
Having to go to Word Options | Customize to turn on the AutoText icon for Commands not displayed in the Ribbon was a good thing to figure out.
After that I created a a simple test macro template and added two Auto Text entries to the Building blocks Gallery.
Then did some rough code like this:
[VBA]Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
If ContentControl.Tag = "choice" Then
Dim choice As String
choice = ActiveDocument.SelectContentControlsByTag("choice").Item(1).Range.Text
ActiveDocument.AttachedTemplate.AutoTextEntries("Terms " & choice).Insert _
Where:=ActiveDocument.Bookmarks("Terms").Range
End If
End Sub[/VBA]
That worked. I'll clean it up for my circumstances.
Any other pointers on how to approach this? Was glad to figure out AutoText, very cool feature to this Word rookie!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules