Wednesday, 22 May 2019

Embed Macro in Document Word


Is there a way to store custom macros inside a word document? I noticed that when I distribute a document with a macro I made that it arrives "macro-less" and therefore doesn't perform as expected.


I'd like to embed the needed macro inside the document to make it portable.


Perhaps this just isn't possible, but I'm hoping it is.


We use mostly office 2013



Answer



So when using VBA there are two places to store things.


Normal = "Global" to all local Docs, but also local to your machine


Project = "Only this Document" has access to these modules and they are portable AKA Embedded into Document! (Also, unavailable to all other doc's)


Note this image, the module and class are embedded inside the document vs global.


enter image description here


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...