Save document without saving macro within it?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Help,

I have a program that sends results to a xls-document and opens it. This
document contains a macro that automaticlly starts when the document opens.
The macro deletes two pictures and gets two new from a specified map on a
network.

If I want to send the document to a person outside the network I have a
problem. The macro deletes the two old pictures but does not find the new
ones.

Is there any way to save the document under another name, after it has been
open the first time, without saving the macro? Can I do this in a easy
automatic way, not by doing it manually?

If that's impossible I would like the macro to work like this:
-start macro
-delete pictures
-get new pictures
-delete macro

I also want to do this several times with the same document. This means that
the first macro must be there when I open the document the next time. Is it
possible?

Anyone?

/Biggis
 
Another option is to put the macro in a separate workbook.

Then open both the macro workbook and the "real" workbook. Execute the code
against the real workbook to clean it up. And there would be no macros to send.
 

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

Back
Top