Building Blocks and Macros

Discussion in 'Word' started by Terry, Aug 8, 2017.

  1. Terry

    Terry

    Joined:
    Aug 8, 2017
    Messages:
    2
    Likes Received:
    0
    I have created a document in Word 2016 which contains a number of optional entries in the form of building blocks. These are inserted when the user clicks on a button to run a macro. The document runs fine from a laptop it was created from and from a network drive when I connect using the same laptop.

    When I attached the document to an e mail and sent it to myself to open on another machine the macros no longer work. The appropriate building blocks appear in Quick Parts and the Macros seem to be with the document.

    Am I missing something obvious and how can I get this to work on any machine?
     
    Terry, Aug 8, 2017
    #1
    1. Advertisements

  2. Terry

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    266
    Likes Received:
    21
    When you save a Quick Part, you have the option of choosing a save template (e.g. Normal.dotm or Building Blocks.dotx). Unless you copy that template to the new system, those Quick Parts - naturally enough - exist only on your laptop.
     
    macropod, Aug 8, 2017
    #2
    1. Advertisements

  3. Terry

    Terry

    Joined:
    Aug 8, 2017
    Messages:
    2
    Likes Received:
    0
    I thought that was the case when it all works from the laptop the document was created on. My problem is that I need the document to work on a multitude of machines across multiple locations. I was hoping there is a way of storing the building blocks within the document itself.

    Any suggestions would be most appreciated.
     
    Terry, Aug 8, 2017
    #2
    1. Advertisements

  4. Terry

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    266
    Likes Received:
    21
    What you probably should have done is to save your document as a template. Then, you'd be able to save the building blocks to it and distribute the template with the building blocks included. Anyone who double-clicks on the template (or uses another method to create a document from it) would get a new Word document with access to the building blocks.
     
    macropod, Aug 9, 2017
    #4
  5. Terry

    Terry

    Joined:
    Aug 8, 2017
    Messages:
    2
    Likes Received:
    0
    The problem is getting it to work on independent platforms and where the macros are looking for the building blocks. I have created the document as a template and assigned the building blocks to it. The macros are also on the template. The idea is that a user can open a new document from the template and, by clicking on either yes or no to answer questions, rapidly populate it with standard predefined information. This works fine when the user is connected to the network as the macros point to the right file path.
    However when the user isn't connected or somebody moves the template, the macro's point to a non existent file path so the document stops working. Is there any way I can produce a macro that looks into the document containing it, irrespective of which machine it is on or if its connected to our network or not.
     
    Terry, Sep 18, 2017
    #5
  6. Terry

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    266
    Likes Received:
    21
    If users aren't going to be on the network, they'll need to store the template locally and use that. As it is, documents created from the template will have the docx format, and those can't contain macros. Even if you were to save the documents in the macro-enabled docm format, you'd still have to transfer the macros (manually) and they still wouldn't be able to find the building blocks.
     
    macropod, Sep 18, 2017
    #6
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. pfisher

    Office XP and Clip Art

    pfisher, Apr 21, 2011, in forum: Word
    Replies:
    0
    Views:
    671
    pfisher
    Apr 21, 2011
  2. vemareddyrajula
    Replies:
    0
    Views:
    549
    vemareddyrajula
    Feb 27, 2012
  3. Zoizee
    Replies:
    2
    Views:
    983
    Zoizee
    Aug 15, 2012
  4. TechEd
    Replies:
    0
    Views:
    587
    TechEd
    Jun 9, 2014
  5. saline

    Macros for figure borders

    saline, Aug 20, 2016, in forum: Word
    Replies:
    1
    Views:
    191
    macropod
    Aug 21, 2016
  6. aprengo
    Replies:
    1
    Views:
    111
    macropod
    Feb 28, 2017
  7. kleis
    Replies:
    2
    Views:
    126
    kleis
    Jun 13, 2017
  8. samtins21!

    How to use Macros

    samtins21!, Aug 14, 2017, in forum: Word
    Replies:
    1
    Views:
    99
    macropod
    Aug 14, 2017
Loading...