1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Macros for different document types in Word 2007

Discussion in 'Business Applications' started by Tara99, May 7, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. Tara99

    Tara99 Thread Starter

    Joined:
    Mar 29, 2004
    Messages:
    20
    I receive four different kinds of documents that I need to comment on extensively. I use a lot of macros, and my list is getting too long to be useful.

    Using Word 2007, is there any way to divide my long, unruly list of macros into four separate lists, each of which could be used with one of the four types of documents?

    I've tried searching for help and I'm either using the wrong terms, or this is nowhere nearly as straightforward as it seems like it should be.

    Any help would be very much appreciated.

    Thanks!
     
  2. XCubed

    XCubed

    Joined:
    Feb 21, 2013
    Messages:
    520
    Hi

    Are all your macros in the Normal template under the NewMacros project?
    Do you select macros from the View or Developer ribbon?

    If the answer is "no" can you explain where the macros are and how you run them. If "yes" here is one possible solution.

    If this is the case you can create new projects in the normal template and segregate your macros according to type in the newly created projects.
    Then, when you open a document type you would click on Macros/Organise and you will see the different projects listed on the right. You would then copy the appropriate project to the current document and when running macros you would select from the current document and those would be the only macros you would see to select from.

    A bit confusing so if you have any questions don't hesitate to ask.
     
  3. Tara99

    Tara99 Thread Starter

    Joined:
    Mar 29, 2004
    Messages:
    20
    Thank you so much! I will try that tomorrow, and hopefully even be able to manage it without asking for help too many times along the way. :)
     
  4. XCubed

    XCubed

    Joined:
    Feb 21, 2013
    Messages:
    520
    Glad to help and glad to answer any follow-on questions.

    Things to do or pay special attention to are;

    create a copy of all your macros in NewMacros before you start (select all in NewMacros/copy and paste into Notepad
    ensuring that you don't miss any macros when you copy them to new projects
    When you are happy that all macros are copied successfully make sure they are deleted from the NewMacros project
    Rename the new projects so that you don't get confused when moving the macros and this will also make it easier when selecting the macros for running in a specific document.

    Good luck!
     
  5. Tara99

    Tara99 Thread Starter

    Joined:
    Mar 29, 2004
    Messages:
    20
    I'm sorry. I think I'm going about this the wrong way. How would I create a new project? Am I reading the help documentation incorrectly? It reads to me like it should be in the Visual Basic file menu, but I don't see it there. (See attachment.)

    I'm sorry if this is a really dumb question. It seems like this should be the easy part.
     

    Attached Files:

  6. XCubed

    XCubed

    Joined:
    Feb 21, 2013
    Messages:
    520
    I may have used the wrong terminology...

    Click on Insert/Module

    This will create Module1

    To change the name click on View/Properties Window

    in the properties window you should see

    (Name) Module1

    Just overwrite Module1 with something meaningful e.g. Type1. There can be no spaces in the module name.

     

    Attached Files:

  7. Tara99

    Tara99 Thread Starter

    Joined:
    Mar 29, 2004
    Messages:
    20
    Thank you so much! I think I should be able to work that out now. I really appreciate your help!
     
  8. Tara99

    Tara99 Thread Starter

    Joined:
    Mar 29, 2004
    Messages:
    20
    Thanks again for your patience. I had no idea I would feel this far over my head.

    Should I leave NewMacros project in place and empty? The reason I'm asking is I backed everything up, copied some macros into one of the four new projects, and removed the NewMacros project. It looks like all of the old macros are available when I select one of the three projects I thought had nothing in them yet, and there are some duplicates in the project I thought I'd been pruning down.
     
  9. XCubed

    XCubed

    Joined:
    Feb 21, 2013
    Messages:
    520
    I'm a bit confused about what the problem is but first - this is my fault - the correct term is "module" not "project"

    You say you migrated macros to 1 module?
    Then you deleted NewMacros?
    But some of the macros you deleted from NewMacros but did not migrate to a new module were still available?
    And others were duplicated?

    Is that what's happening?

    It's probably a good time to take stock of what is where and what is where it should be.
    Unfortunately this is a manual process but should only be one-time ordeal.

    In a module click on the area shown in the attached image and type into the document the macros that are in that module.

    There should be no duplicates - this can cause a macro to crash if it refers to another macro that is duplicated. If you have macros that are used across different types of documents these should be in their own module.

    In the end you should have a list like this

    Module Type1 macros
    Macro1
    Macro2
    Macro4

    Module Type2 macros
    Macro3
    Macro5
    .
    .
    Etc

    If I've misunderstood the problem (very likely) can you try to explain again with examples?
     

    Attached Files:

  10. Tara99

    Tara99 Thread Starter

    Joined:
    Mar 29, 2004
    Messages:
    20
    I think I need to cave in and realize I'm too far out of my depth, but I very much appreciate the raft you threw me along the way. Thank you!!
     
  11. XCubed

    XCubed

    Joined:
    Feb 21, 2013
    Messages:
    520
    That's too bad :(

    If you can tell me where you are getting stuck I'm happy to take you through it step by step.
     
  12. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1098119

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice