Link to home
Start Free TrialLog in
Avatar of procision
procision

asked on

Macro MS Word

Hello, the company has a custom MS Word Macro. I copied the macro from one computer. I saved it to another computer specifically to %Appdata%/Microsoft/word/startup. When I try to run the macro, I got message "run-time error '91':  object variable or with block variable not set. I appreciate your reply :)

I notice I can't open the VBS editor as well from MS Word.

If ever this successfully run, how can I add this custom macro into button at MS Word.
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

How did you copy it? Did you copy just the code to a new document or copy the original document? I suspect that you missed a line if youcopied the code.

Provide the code for checking.
Avatar of procision
procision

ASKER

I just copied the original document.

Do you still want the code?


 Generally what I'm trying to achieve is migrating a custom macro from one computer to another computer. copying it to %Appdata%/Microsoft/word/startup  on another computer is one of the ways I saw on internet. if you have a better way, that would be great.
Is the document saved as an addin?

Can you attach the file here?
They gave me this template. it's a .dotm file
Here's the attached file
ACPUtils_KA.dotm
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.