Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-12-2019, 09:06 AM
WivanS WivanS is offline Select specific Account after using EnvelopeVisible Windows 10 Select specific Account after using EnvelopeVisible Office 2016
Novice
Select specific Account after using EnvelopeVisible
 
Join Date: Aug 2019
Posts: 5
WivanS is on a distinguished road
Question Select specific Account after using EnvelopeVisible

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
Reply With Quote
 



Similar Threads
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
Select specific Account after using EnvelopeVisible How do I select all text highlighted in a specific colour? bertietheblue Word 2 04-15-2016 12:30 PM
Select specific Account after using EnvelopeVisible signature for specific account 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
Select specific Account after using EnvelopeVisible Using ActiveWorkbook.EnvelopeVisible = True to send part of a sheet as an email. bshawnr Excel Programming 1 04-12-2014 05:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft