Consulting

Results 1 to 2 of 2

Thread: Solved: Problem adding Macro Buttons to the QAT in Word 2007

  1. #1

    Solved: Problem adding Macro Buttons to the QAT in Word 2007

    I have the following xml code in a template file (dotm). When I assign this dotm file to a word document, the new buttons on the Quick Access Toolbar do not show up. While I have this document open, if I open a recent document off of the office menu, the new document will open in a separate window and the buttons will show up on the original document that I assigned the template to. It's almost as if something is not initializing until I open another document and then pass focus back to the original document. I can place the standard buttons on the QAT along with the macro buttons and the standard buttons will show up as soon as word is opened but the macro buttons won't. Is this a bug in word 2007 or am I missing something in the XML file, the VBA, or possibly something in the setup of Word 2007?


    HTML Code:
    <ribbon startFromScratch="true">
      <qat>
        <documentControls>
          <button id="PrevDoc" abel="Previous Document" mageMso="GoRtl" 
            onAction="PreviousDocument"/>
          <button id="NextDoc" abel="Next Document" ImageMso="GoLeftToRight" onAction="NextDocument"/>
        </documentControls>
      </qat>
    </ribbon>


  2. #2
    I finally figured it out myself. Its kind of klugey.

    Add the following code to the Load function pointed to by the xml

    [VBA] Application.Documents.Add
    If ActiveDocument.Name <> ThisDocument.Name Then
    With ActiveDocument
    .Saved = True
    .Close
    End With
    End If[/VBA]

Posting Permissions

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