Building Blocks and Macros

Joined
Aug 8, 2017
Messages
2
Reaction score
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?
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
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.
 
Joined
Aug 8, 2017
Messages
2
Reaction score
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.
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
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.
 
Joined
Aug 8, 2017
Messages
2
Reaction score
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.
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
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.
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top