Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Aug 2013
    Posts
    46
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Packing the macros in a a file

    Now that my VBA code is working well on my computer, I am trying to find a way to deploy it to several users, with an easy as possible installation process.
    The method currently on my mind: have a template with the needed content, and a master word file that will automatically open (with "AutoOpen") a new files based on the template, once the master word is being opened.

    It is working well on my computer, but when I tried on a different one it failed. The reason: the macro was not part of the file.

    This means I don't really understand where macros actually reside.

    How can I make a macro reside on a specific word file, and not be seen by any other word file, even if they are on the same folder or same computer?

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    YagilB,

    Make sure the macros are located in one of the yellow highlighted areas below, where Document 1 is the document you want to distribute:
    wordmacros.JPG
    Note: When you record macros the default location is in Normal, which will make them available to all your documents but they won't transfer with a document to another computer.

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. The Following User Says Thank You to RetiredGeek For This Useful Post:

    YigalB (2014-11-07)

  4. #3
    Lounger
    Join Date
    Aug 2013
    Posts
    46
    Thanks
    11
    Thanked 0 Times in 0 Posts
    I was not aware the macro is located at "Normal".
    I just tried and the "AutoPpen" runs on every word file I have. This is bad. Ooops.
    Thank you for clarifying that.

    I can see the tree as you presented in the VB editor, but I couldn't find a way to move it to the specific project. Can I?
    Or should I just copy and paste it? (or better: cut and paste!)

  5. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    YigalB,

    Just open a new document then cut and paste from Normal to a Module in the New (Document1) then save it with a name. HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. The Following User Says Thank You to RetiredGeek For This Useful Post:

    YigalB (2014-11-08)

  7. #5
    Lounger
    Join Date
    Aug 2013
    Posts
    46
    Thanks
    11
    Thanked 0 Times in 0 Posts
    It is working now. Thanks for your guide lines.
    Yigal

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
  •