Consulting

Results 1 to 2 of 2

Thread: QAT removal in VBA

  1. #1

    QAT removal in VBA

    I have defined a template .dotm file with macros activated by QAT buttons.
    Based on the template, an ordinary .docm file can be made, filling in fields and adding text. The QAT buttons invoke code in the template to perform some checking or formatting. When the future .docm file is created from the template by double clicking it, it opens as "Document1" (to be saved under a .docm name later) with a single set of QAT buttons (those of the template).

    However... once the "Document1" is saved and closed as .docm file, upon re-opening it, it has 2 sets of identical QAT buttons. One from the template and one from the .docm itself (both referring to the macros in the template).

    How can I avoid the .docm to get a copy of the template QAT buttons? I did not expect this, as the macro modules are not copied and remain exclusively in the template project
    (with one exception: the "openclose" module with AutoOpen/AutoClose is copied upon the documents AutoNew creation event containing:

    Application.OrganizerCopy "C:\template1.dotm", "Document1", "openclose", wdOrganizerObjectProjectItems
    )

    Or if not, how can I remove the QAT on the .docm file so effectively one set of QAT buttons from the template remain?

  2. #2
    This is most peculiar... I whipped up a simple template with just a "hello" QAT button from the template. Deriving documents from it do not duplicate this button. It's unclear to me why my "real life" file does duplicate the buttons... Anyway, the simple template is included. Double clicking it opens a new document based on the template.
    (For odd reasons I could not upload it as SimpleTemplate.dotm (as it is a template) but only as a .docm - so you need to rename this if downloaded)
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •