PDA

View Full Version : Removing VBA Code from Documents



Cyndrax
03-07-2006, 06:17 AM
I have some VBA code that I've written to auto generate some sections of a series of documents I am writing. Before I send these documents to the final user, I want to remove this VBA code. This leads to two different options, and I am looking for guidance on how to proceed with either.

First, is there a way to parse an entire directory of document and remove all VBA code from all the documents in the directory?

Second, is it possible to have VBA code that deletes itself when it is finished running?

Brian

Cyndrax
03-07-2006, 07:43 AM
Never mind, I missed the most obvious solution. I just moved the VBA code into Normal.dot and then it never gets included in the documents at all.

I'll mark this solved, but if anyone has ideas on how to mass remove VBA, it would be interesting to hear regardless.

Brian

fumei
03-07-2006, 08:15 AM
Why is this needed?

It is possible to write VBA code that will remove procedures from modules in another document.

Cyndrax
03-07-2006, 09:03 AM
I did not want to send the VBA code to the customer, as they have no need for it and I wanted to prevent confusion or issues with VBA and any security settings on their computers.