View Single Post
 
Old 02-09-2023, 06:59 AM
Charles Kenyon Charles Kenyon is offline Windows 11 Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,470
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Those braces are not typed text. They are field delimiters that must be inserted as such. You are attempting to build a nested field.

I believe this can be done but do not know, off the top of my head, the construction to do it. I will research this but expect that one of the better coders here will be back with the code before I find the answer.

Off hand, the way I would probably approach this would be to create the field in a document and save it as an AutoText entry. Then I would code to insert the entry.
Using VBA to Insert an AutoText Entry or other Building Block That may not be the best way but it is the way I could create the field quickly using vba without a lot of research. I generally use AutoText/Building Block entries to hold anything requiring complex formatting to be inserted with vba.

In the meantime, I am moving this thread to the Word VBA Forum from the general Word forum.
Reply With Quote