|
-
May 4th, 2005, 10:19 AM
#1
Thread Starter
New Member
Sending mail from Word automation
Hello everyone,
From an acces database, I generate detailed MS Word documents, which are printed afterwards.
A next step would be to automatically email the resulting documents to a fixed list of recipients, preferrably with "read receipt" option activated.
In a later stadium, encryption of the email message would be required.
Does anyone have some good pointers for me for good documentation or examples of this ? Can I use the Word.mailer for this ?
Thank you,
Phaedra
-
May 4th, 2005, 11:59 AM
#2
Frenzied Member
Re: Sending mail from Word automation
What email program are you using? If Outlook you can create an Outlook object and use that to mail the Word docs as attachments.
If the docs you email don't have to be the Word docs themselves, you can use SendObject in Access to email reports, which are in .rtf format, but SendObject doesn't support attachments.
You could also use smtp (I think that's what it's called), but I've never used that.
Tengo mas preguntas que contestas
-
May 4th, 2005, 12:56 PM
#3
Thread Starter
New Member
Re: Sending mail from Word automation
Hello,
I have experimented with the options you mentioned, but they are insufficient for my needs :
- I don't want to save the generated document and send it as an attachment : I want to email it directly, in the body of the email message
- the sendObject method doesn't allow you to fine-tune the email options as the Word.Mailer object.
That's why I'm looking for documentation / examples / tips / .... about this object (or alternatives ?)
Thanks,
Phaedra
-
May 4th, 2005, 01:15 PM
#4
Re: Sending mail from Word automation
Something like this should get you started.
VB Code:
ActiveDocument.MailEnvelope.Item.Introduction = "Test"
With ActiveDocument.MailEnvelope.Item
.Subject = "Here is the document."
.Send
End With
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 9th, 2005, 04:25 AM
#5
Thread Starter
New Member
Re: Sending mail from Word automation
Thank you for the code in the last post, Rob.
I got it working with that.
From my Access db I create the Word document, which contains complex formatting.
I then prepare the message parameters (recipients, subject, intro), after which I show the generated document (preview before sending), which contains a command button.
Clicking this command buttond causes the document to be sent, after the button has deleted itself.
The one thing I can't seem to find is how to set the message option to ask for a read receipt (Outlook is the default email program). Any ideas ?
Thanks again, you've been a great help.
Phaedra
-
May 9th, 2005, 10:55 AM
#6
Re: Sending mail from Word automation
I thought I may have done something with that before. Lets search for it on the Forums. Post the link if you find it beofre me.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|