Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inconsistent look when changing context menu (VBA Word 2000)

    I use the following code to set the Update Fields shortcut to a macro:

    <pre>ActiveDocument.AttachedTemplate = "Normal.dot"
    CustomizationContext = ActiveDocument
    With CommandBars("Hyperlink Context Menu").Controls(5)
    .Caption = "Update Field F9"
    .OnAction = "UpdateAndFormatFields_TOC"
    .BeginGroup = True
    End With
    ActiveDocument.Saved = False
    ActiveDocument.Save</pre>


    I've used this fine in many documents. Today I ran it on a document, and everything looked and worked fine. Then I saved and closed. When I reopen, it looks like my customizations (stored in the document) are being overriden by those in Normal.dot.

    Now here is where it get's really strange: All I have to do is display the Customize dialog box (the one I would use to adjust keyboard or menu shortcuts), immediately close the Customize dialog box without doing anything, and suddenly the shortcut appears and works as I programmed it to. If I save and close and reopen, it is back to the Normal.dot version.

    Any idea what is going on in this document?

    Thanks!!
    Troy

  2. #2
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inconsistent look when changing context menu (VBA Word 2000)

    Nobody bit on this one, but I think I stumbled upon the cause. If I unload a global addin (PDFMaker.dot), everthing works fine. It appears this file must have a class module that fires everything you change document windows or create a new document window. I say that because I can breifly see a custom toolbar I have when I ALT+TAB back to the document, and then it disappears.

    Any ideas, short of unloading this file, to prevent this? Or has anyone else seen this? I have Acrobat 6 (which has some great new functionality, but also has lots of bugs and works like a piece of junk. Maybe they started taking lessons from Microsoft???).

    Troy

Posting Permissions

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