Question:
Macros problem - why do they keep disappearing?
AbbeySam
2008-11-17 01:06:37 UTC
I have received a Word document which has macros embedded. When I copy and paste it into my templates folder, the macros have been erased and the document doesn't function properly - how do I stop the macros from being erased? I have already entered the templates folder as a trusted location.
Five answers:
Lucy
2008-11-17 01:36:10 UTC
When a Word document has embedded macros, you have to save the document as something else. You can't copy/paste because that would only copy the text on the page, not the macros which are written in Visual Basic behind the scenes.



You need to do the following:

1. Open the document if you do not already have it open.

2. File>Save As

3. Type new filename

4. Choose a different location if desired

6. Click Save



Following those steps will preserve the VBA macros.
harry_adney
2008-11-17 01:40:38 UTC
Did you copy and paste the Word document or the code file to the templates folder? You should be able to run the macros from the document you received. You can save that document anywhere, for convenience.



Alternatively:



Press alt + F8 in the document with the macros;

Open the macros by clicking the Edit button;

Copy and paste into a Notepad document.

Open a new Word document;

record a new macro, then stop immediately;

paste the text from the Notepad document into the new (empty) macro)

Save it (close)



You'll need to copy the text from the Word doc you received into the new Word doc, so that all of the fields are available.



(Edit)

Lucy's answer is so much more succinct than mine!
lempicki
2016-12-14 20:29:05 UTC
this is a deadly disease. If attainable attempt working your antivirus application, not a rapid test yet an entire device test, once you do this (have been given rid of the virus) you are able to pass to device fix, this might fix your laptop returned some days earlier this ensue. supply this a attempt. pass to start>administration Panel>look for device Backup and fix c. power, click there and stick to instructions. stable success
Wonderball
2008-11-17 01:12:33 UTC
I don't know if you can copy that way.



Try opening the document in something that doesn't run scripts, such as windows Notepad, then copy the code from there.



Hope that helps.
vivek r
2008-11-17 01:13:34 UTC
check in the microsoft office.

set some options in tools- option for macro settings. it will help you.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...