Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

email macro that unlocks document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Anderson - 05 Jun 2005 15:23 GMT
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
Doug Robbins - 05 Jun 2005 20:41 GMT
If you just add

ActiveDocument.Close wdDoNotSaveChanges

the copy on your computer should still be protected (if it was in the first
place).

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>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
[quoted text clipped - 14 lines]
>
> End Sub
Mike Anderson - 12 Jun 2005 16:55 GMT
I couldn't get that to work but it started me in the right direction.  I
ended up with-

ActiveDocument.Close OriginalFormat

This sent the document as unprotected and kept the original protected and
closed it in word.

Thanks for your time.
Mike

> If you just add
>
[quoted text clipped - 21 lines]
> >
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.