Results 1 to 8 of 8
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Hi Everyone:

    My question concerns what I should advise my Network Administrator regarding an AutoExec & AutoExit macro in a new template that they've placed in everyone's startup folder.

    The new template is necessary. The AutoExec macro places a toolbar button on the Tools menu. Clicking the button brings up a userform that allows the user to pick a numbered file to insert into a document. The files listed in the userform are modified, deleted, & added from time to time. The AutoExit macro removes the toolbar button from the Tools menu.

    The problem that I have is that since the macros cause a change in normal.dot, they cause a prompt (I always have that option ticked.) when I exit Word. I've actually got around the problem by saving normal.dot with the button still on the menu, then opening the new template & renaming the two AutoMacros so they don't run. However, they modified the template, pushed it down again, & so I need to keep repeating this.

    I was going to advise them to put the button on just once & leave it. Will my solution prevent them from making updates to the target files in the userform? Is there a better way of handling this?

    Thanks in advance.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Phil,

    It's probably better to leave the button on there- but your autoexec code will have to make sure it checks for the existance of a button before it adds a new one. In the past, I've also had to code in removing a duplicate button as well- because the checking wasn't working correctly on the first release.

    You can directly save normal.dat by the macro (normaltemplate.Save)- that should stop the prompt.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Hi Geoff:

    Thanks for the response. The macros aren't mine; the administrator put them there. Actually, I mispoke about a button, the command is actually put on a menu, which is why it calls the prompt. The command stays there now, because I disabled the AutoExit macro (& the AutoExec). The menu command merely calls up a userform. I'm wondering whether there's a way that the userform can be updated with changed choices (by the administrator), without having to add & delete the menu command each time Word opens & closes. i.e. any problem with telling the administrator to do away with first the AutoExit (so the menu command stays) & then the AutoExec (because the menu command is already there)?

    Thanks again.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Hi Phil. I use a button, sometimes on the menu bar, sometimes on the Standard toolbar, sometimes on a toolbar of its very own. However, I actually create an add-in template that is stored in the Startup folder. The modfication to the Standard toolbar or menu bar is made when this template is open, and therefore the changes do not occur in the Normal template. If the template is loaded the button appears, if it's not loaded (for some reason) it doesn't appear - as the template is in Startup it is automatically loaded - no need for autoexec or autoexit macros.

    My button calls a user form located in the template. Each person has their file locations pointing to their local drive and uses templates from there. I make changes to the userforms and any macros etc in the add-in template(s) and these are stored on another folder on the server. I can work on them at any time and not interfere with users. When a user logs off and logs on again, their login script identifies that there has been a change to the template(s) in Startup and Workgroup Templates and copies these to the user's local drive.

    Voila... no problems with normal. User's can still use Normal for whatever they want - autotext entries, personal macros etc, and I can provide them with updated templates, macros at will.

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Hi Karen:
    Thank you very much. I was a little dense before. All they (my systems department) have to do is add the command to the Insert menu in the special global template, rather than in normal.dot.

    Essentially, I need to recommend to them that they add the command to the special template only. They can revise the template whenever needed & copy it to the local drives using a login script. As I don't know how to write the script, I can only hope they do. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Thanks again.

  6. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Hi Phil,

    When I have an Add-In and I want something different in the user interface, especially when adding something, I try to simply add the command directly in the Add-In rather than using code. Normally, I construct the menu command/button on a custom toolbar and then copy it to one of the built-in toolbars. The customization remains in my Add-In without messing with the user's normal.dot at all.

    If I need to change something using code (seldom) I set the customization context to my template rather than normal.dot and set the saved property for the template to true.

    I suspect that with the setup you are describing that you will get multiple instances of your button in your user's normal.dot. This is because there will be times when the AutoExit doesn't run (Word being the fault-tolerant wonder that it isn't).
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Hi Charles:
    Thanks for the reply. I've read your articles on toolbars on your website & agree that's the way to go. And I agree that they don't need the 2 Autoxxxx macros. I would think, however, that whether they copy the command from a special toolbar to one of the standard toolbars or an actual menu won't matter, as long as they get rid of the Automacros.

    i..e. I think I can have them follow your method, but have them copy the command from the special toobar to to a menu, rather than to the standard toolbar (which I don't use anyway),wouldn't you agree?

  8. #8
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Network Admin Changing normal.dot with AutoExec (Word 97/SR-2)

    Hi Phil,

    You are correct that copying to a built-in toolbar or a built-in menu is the same thing. The key is to create it on a toolbar that exists only in the template first, then copy it to the built-in (while keeping the customization context the Add-In). If they directly modify one of the built-ins, even with the template as the customization context, changing it or moving it later becomes a real problem.
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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