![]() |
#1
|
|||
|
|||
![]()
With the macro below I can very nicely send my present Word document (2016) using Outlook (2016) as e-mail application.
Sub From_WORD__Outlook() ActiveWindow.EnvelopeVisible = Not ActiveWindow.EnvelopeVisible ActiveDocument.MailEnvelope.Introduction = "This is a WORD document" With ActiveDocument.MailEnvelope.Item .Recipients.Add "MyAddress@MyMail.com" .Subject = "Experiment" End With End Sub However, I want to send the e-mail using a specific account. I tried to use the macro below, but that doesnot changes the default Account as presented in the active Word document. (It does change however the present account in Outlook, but apparently that is not the same as the one presently valid in WORD) Set objOL = CreateObject("Outlook.Application") For Each oAccount In objOL.Session.Accounts If oAccount.DisplayName = "reguired@emailad" Then Set oMail = objOL.CreateItem(olMailItem) oMail.SendUsingAccount = oAccount End If Next A second problem is that in Recipients.Add I cannot select a group of preselected accounts from the active addressbook Can anyone help me solve these problems? Thank you Regards, WivanS |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot change/select/Add older .PST file from Account Settings n O2016 | Hixpix | Outlook | 0 | 09-26-2017 03:51 AM |
![]() |
bertietheblue | Word | 2 | 04-15-2016 12:30 PM |
![]() |
Mr.T | Outlook | 1 | 02-17-2015 03:10 PM |
Mark BCC when emails is sent from specific account | vijanand1279 | Outlook | 0 | 05-27-2014 09:59 PM |
![]() |
bshawnr | Excel Programming | 1 | 04-12-2014 05:02 AM |