
Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
I understand that. Thankfully, this is more of a precaution to prevent
accidental copying. The people using this document are not very technicallu
adept, and most are trained to just allow macros to run.
Is there no way at all to have a macro delete the file its running from?

Signature
Best Regards,
Luke Moraga
> There is no way on earth to prevent someone copying a document that you
> allow them to see. Certainly a macro solution would take all of five seconds
[quoted text clipped - 14 lines]
> > Also, any help on how to handle situations where macros are disable
> > would be appreciated.
Bear - 19 Jun 2007 22:02 GMT
Luke:
I think the best you could hope for would be to delete the content of the
copy.
If you put your code in an AutoOpen or DocumentOpen subroutine in the
attached macro, you could probably delete the document. But that would depend
on the attached macro being present, which you can't guarantee. Or can you?
Bear

Signature
Windows XP, Word 2000
Luke Moraga - 20 Jun 2007 21:04 GMT
Thank you all!
I was able to get copies of the document to delete themselves on opening,
since its being opened in read-only.

Signature
Best Regards,
Luke Moraga
> Luke:
>
[quoted text clipped - 6 lines]
>
> Bear
Russ - 02 Jul 2007 23:22 GMT
But it's OK to open the original or a copy in WordPad or some other Word doc
viewer, which doesn't run macros?
> Thank you all!
>
[quoted text clipped - 11 lines]
>>> Also, any help on how to handle situations where macros are disable
>>> would be appreciated.

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Karl E. Peterson - 20 Jun 2007 01:58 GMT
> I understand that. Thankfully, this is more of a precaution to prevent
> accidental copying. The people using this document are not very technicallu
> adept, and most are trained to just allow macros to run.
>
> Is there no way at all to have a macro delete the file its running from?
If you *absolutely* insist <g>, have your macro:
* Create a self-deleting batch file that does the dirty deed
* Set Task Scheduler to run the batch file "a few/ten seconds from now"
* Close the document
For step two, see http://groups.google.com/groups/search?q=task+scheduler+edanmo

Signature
.NET: It's About Trust!
http://vfred.mvps.org
Graham Mayor - 20 Jun 2007 07:04 GMT
I think you are in more danger from the training methods that cause users to
'just allow macros to run'. :( It is only a matter of time before one such
naive user brings in a document from outside the organisation that contains
malicious code.
There is no way you can *guarantee* that users would allow the macros to
run. if you were able to guarantee it then you would be creating a virus
which will lead you into new realms of problems. Macros in distributed
documents are always fraught with problems. Why not supply them with a
template from which they can create the documents without the macros?

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> I understand that. Thankfully, this is more of a precaution to prevent
> accidental copying. The people using this document are not very
[quoted text clipped - 30 lines]
>>> Also, any help on how to handle situations where macros are disable
>>> would be appreciated.