Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Omaha, Nebraska, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Programmatically add a macro?

    How do you programmatically add a macro (.bas) file to a users normal.dot? I have a macro that I need to add to our users normal.dot and give them a button to launch it. I am thinking I should be able to use a .vbs file to do this.

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Programmatically add a macro?

    The simplest answer is that you probably don't want to do this. If you need to make a macro available to your users globally, then the best method for deploying it is via a global template (other than Normal.dot, that is).

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

    Re: Programmatically add a macro?

    I'll add my voice to Gary's.

    I've gone down that path. You can update everybody's Normal.dot- but it can cause problems.

    We started by replacing peoples' normal.dot completely. People got upset (the first time it happened to me was 5 years ago- I was just dabbling with macros- I had all my work zapped in one swwop).

    We went on to updating peoples' normal.dot. That worked OK for a while- but it depended on having a core of code in normal.dot which performed the update from inside. When normal.dot wqas corrupted, that didn't work either.

    We went on to updating normal.dot from outside- from an add-in which updated it if the code wasn't the current version. That seemed to work OK until the virus checker zapped it one day- updaring normal.dot from outside is not a friendly activity to a virus checker.

    We're now doing everything from an add-in in the startup directory. There were some problems getting it set up, but that seems to be going along OK now.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Programmatically add a macro?

    While I agree with the sentiments posted above, I can still offer you code to add a macro to Normal.dot if you decide to go ahead.

    My Files application checks Normal.dot to see if there exists a macro called "Process", and if there is NOT such a macro, asks the user if one might be installed, and then creates the macro (and also "ProcessStart" and ("ProcessEnd")

  5. #5
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Pune
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Programmatically add a macro?

    One simple way of making a macro available to many users is to place/copy a shortcut to the template in which the macros are contained, into each user's Word Startup Directory. This does not mess with normal.dot, and also ensures that the macro is available as a global macro everytime Word starts up.

Posting Permissions

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