

This is all very new to me, so I greatly appriciate your help. I don't know if there might be a conflict, but I'm trying to use this in conjunction with your 'Sort message by sender domain', which works perfectly. I'm working in a exported PST opened in Outlook 2010 if that makes any difference. The macro executes without any error, but no data is populated in the recipient email field. Thanks for your quick reply Diane, however I'm unable to get it to function. If I check an 'Office 365 ProPlus' Outlook (FR, Deferred channel), I can see the 'Browse Groups' on the ribbon indeed.
#OUTLOOK FOR MAC 2016 GROUP PROFESSIONAL#
Set objProp = ("Recipient Email", olText, True)įirst: You will need macro security set to low during testing. I've taken the screenshot from an 'Office 2016 Professional Plus' Outlook, same version as Luc Debois - which is btw. 'If InStr(1, LCase(recip), "/ou=") Then recip = Right(recip, Len(recip) - InStr(1, LCase(recip), "recipients") - 13) Private Sub olSent_ItemAdd(ByVal Item As Object) Set olSent = NS.GetDefaultFolder(olFolderSentMail).Items Set NS = Application.GetNamespace("MAPI")

To test, click in the Application_Startup macro and click Run then send a message. These macros need to be in ThisOutlookSession. To add the recipient address field automatically, you need to use an ItemAdd macro. Set objMsg = Application.CreateItem(olMailItem) To write the address list to a new message for easy reading, replace the Set objProp = to objMail.Save lines with the following: Set objProp = ("Recipient Email", olText, True) ' Use semicolon separator if there is more than 1 address ' If InStr(1, LCase(recip), "/ou=") Then recip = Right(recip, Len(recip) - InStr(1, LCase(recip), "recipients") - 13) ' To use only the alias from the x.500 address Set Selection = currentExplorer.Selection Set currentExplorer = Application.ActiveExplorer o=ExchangeLabs/ou=Exchange Administrative Group server addresses are the x.500 address (as seen in the example above), not the SMTP address, however, you can use the Right() function to keep just the alias. Note that when a message is sent to multiple people, all addresses will be entered in the field as one long string, as seen in this example.
