View Single Post
 
Old 03-20-2022, 07:51 PM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,474
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

Quote:
Originally Posted by grNadpa View Post
Your link states:

So, that is clearly part of the problem. And I suspect (as an old mainframe programmer) I'm getting tripped up on terminology -- specifically "macro".

I think, in the link you supplied, meets my needs if "macro" in this context is a generic term for "sub" and "function" that I can include within my form's code.

Without going into great detail here is what I have in development.
I have a userform that loads, instantiates, and unloads via command buttons the user's choice among a spreadsheet and two forms. One of the subordinate forms does the same for its two child forms. Three of those forms use building blocks stored in Quick Parts Gallery's Building Blocks.dotx in (custom) category "Waivers" named "aNotaryForm", "aPartialWaiver" and "aFinalWaiver".

Am I correct to expect that if I include the equivalent of your
Code:
Sub InsertMyBB()
into the form that uses "aNotaryForm" and the same code in the form that uses "aPartialWaiver" and so on that it should work if I save the whole "document" as "WaiverWorksheet.dotm"?
In Word, "macro" is pretty much synonymous with subroutine. It could be used to mean any vba code. It is not confined to recorded keystrokes.

As used in my page, I mean any code dealing with insertion of the building block. If the code is in the same template, then the location of the template containing the building block can always be identified as
Code:
ThisDocument.Fullname
in the code doing the insertion.

Yes. In Word jargon, a template is a particular kind of Word file. MS uses template to mean several things. See Templates in Microsoft Word.
Reply With Quote