Consulting

Results 1 to 5 of 5

Thread: Shared macro with my coworkers

  1. #1
    VBAX Regular
    Joined
    Feb 2019
    Posts
    16
    Location

    Shared macro with my coworkers

    Hello,


    I need help because I want to do something and I don't know if it is possible.


    I have a macro that I have to update every 2 months more or less, and when I update it I have to tell my coworkers that they need to update the macro in their personal book of macros.


    Is there any way that when I update the macro, these updates affect automatically to my coworkers' macros?


    I try to create a macro that once is executed it open the macro of a specific word document but it doesn't work.


    Thank you

  2. #2
    The short answer is no. Your best bet is to save the macro in a template and distribute that template as an add-in. When it needs changing you can save the updated template in a self extracting zip file and the users can use it to update their copies.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    VBAX Regular
    Joined
    Feb 2019
    Posts
    16
    Location
    Quote Originally Posted by gmayor View Post
    The short answer is no. Your best bet is to save the macro in a template and distribute that template as an add-in. When it needs changing you can save the updated template in a self extracting zip file and the users can use it to update their copies.
    What I am doing now is after updating the macro, send a email with the instructions to update their macro in their computers. They just need to delete a module and copy the new one.

    with the comand "application.run ()..." I have tried but it doesnt work.
    Is it imposible to launch a macro from one file in an other file?

  4. #4
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,124
    Location
    Another approach would be to maintain the macro in a template stored in a folder your co-workers can access. Any documents based on or attached to that template will automatically have access to the template's code.


    And, yes, Application.Run does run macros stored in other Word documents. See the Word VBA help file for further details.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  5. #5
    VBAX Regular
    Joined
    Feb 2020
    Location
    Auckland, NZ
    Posts
    16
    Location
    For what it's worth, after all of the above:
    I have a macro-enabled template containing over 100 procedures, which I'm constantly adding too or correcting. My colleagues are using all of these macros, accessed from a custom ribbon tab in Word; so how do I roll out updates?
    1. Everyone has their own version of the macro-enabled template in their Word startup folder.
    2. I have put a copy of this template in a network location available to everybody.
    3. I run an update macro when I'm happy with my corrections/additions which overwrites the network version.
    4. I tell my colleagues I've made some change by email.
    5. They have a similar update macro in their Normal.dotm which is accessible via a custom button on the Word ribbon.
    6. This macro copies the network version and overwrites their own version.
    So it's all done with clicking buttons on the ribbon. The basic code structure I found here: https://wellsr.com/vba/2018/excel/vb...-fso-copyfile/

Posting Permissions

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