Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate email from Access - move to specific folder

Status
Not open for further replies.

mudstuffin

Technical User
Sep 7, 2001
92
GB

Good Afternoon.

I have a form in an Access 2002 database with a button on it that generates an HTML email based on the information in the current record.

When the user clicks send on the email, I would like to have this mail moved to a specific folder in a shared mailbox so everyone can see copies of the emails.

Can this be done - and from the access database?

I thought i could do it with the SaveSentMessageFolder method but I only managed to rename my sent box !

Regards,


MudStuffin.

 

Would the Move Method be of help?

Oh! About renaming your sent folder, I 've done it too and haven't found a way to rename it back!
 
Thanks for your reply.

I did try the Move Method and I couldnt quite get it to work with that - although I cant remember why!

I reverted back to the SaveSentMessageFolder way and put it in a different place which was just before the 'With objMail'. This did the trick as it is now working. I must have tried to use it within the 'With' or after it, which must have been why it didnt work.

(this isnt all the code - just shows the order!)

----------------------

Dim objMail As Outlook.MailItem

Set objSentFolder = Session.Folders("SHAREDMAILBOX").Folders("Outgoing")


Set objMail.SaveSentMessageFolder = objSentFolder


With objMail
.bodyformat=olformatHTML
.and so on and so on
End with

----------------------


Regarding the renaming of the folder - I ran the same 'mistake again' but overtyped the folder name that I was trying to change it to with 'Sent Items' which is was in the first place. That did the trick - phew!

Regards,


Greg.

Philosophical and slightly witty comment to follow here....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top