Email Macro that unlocks Document

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

Guest

I have a macro that send the document to email as an attachment that works
fine. I also added another command that unlocks the document when it is
being attached. What I would like to do is have the original document stay
protected and only have the attached copy unprotected. Here is what I have
so far, and it does work, but like I say I want the original document to stay
protected. I am very new to this and learning as fast as I can.
Thanks Mike

Private Sub CommandButton1_Click()

Options.SendMailAttach = True
ActiveDocument.SendMail
Unprotect Password:="shops05"

End Sub
 
Hi =?Utf-8?B?TWlrZSBBbmRlcnNvbg==?=,
I have a macro that send the document to email as an attachment that works
fine. I also added another command that unlocks the document when it is
being attached. What I would like to do is have the original document stay
protected and only have the attached copy unprotected. Here is what I have
so far, and it does work, but like I say I want the original document to stay
protected. I am very new to this and learning as fast as I can.
My inclination would be to say: How about if you save the document, then
unprotect and send it, and afterwards close the document without saving?

Otherwise, you'll need an additional button to click on after you've sent your
email, to reinstate protection.
Private Sub CommandButton1_Click()

Options.SendMailAttach = True
ActiveDocument.SendMail
Unprotect Password:="shops05"

End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
Back
Top