- MICROSOFT VISUAL BASIC FOR APPLICATIONS X400 HOW TO
- MICROSOFT VISUAL BASIC FOR APPLICATIONS X400 CODE
Pa.GetProperty(PR_SMTP_ADDRESS).ToString() ĭebug.WriteLine(recip.Name + " SMTP=" + smtpAddress) Outlook.PropertyAccessor pa = recip.PropertyAccessor Outlook.Recipients recips = mail.Recipients įoreach (Outlook.Recipient recip in recips) private void GetSMTPAddressForRecipients(Outlook.MailItem mail) For more information about using the Outlook PIA to develop managed Outlook solutions, see the Welcome to the Outlook Primary Interop Assembly Reference on MSDN.
MICROSOFT VISUAL BASIC FOR APPLICATIONS X400 CODE
The Application object in the code must be a trusted Outlook Application object provided by ThisAddIn.Globals. You should use the following code in the ThisAddIn class of an Outlook add-in (using Office Developer Tools for Visual Studio). Before you run managed code samples for Outlook 2013, ensure that you have installed the Outlook 2013 PIA and have added a reference to the Microsoft Outlook 15.0 Object Library component in Visual Studio. For Outlook, you can use Visual Studio and the Outlook Primary Interop Assembly (PIA). NET Framework managed code sample that needs to call into a Component Object Model (COM), you must use an interop assembly that defines and maps managed interfaces to the COM objects in the object model type library. The following managed code is written in C#. Sub GetSMTPAddressForRecipients(mail As Outlook.MailItem) The following code sample is written in Microsoft Visual Basic for Applications (VBA). For each Recipient in that Recipients collection, the method then obtains the PropertyAccessor object that corresponds to that Recipient object, and uses the PropertyAccessor to get the value of the MAPI property, that maps to the SMTP address of the recipient. The method first retrieves the Recipients collection that represents the set of recipients specified for the mail item. The method in the code sample, GetSMTPAddressForRecipients, takes a MailItem as an input argument and then displays the SMTP address of each recipient for that mail item. Visual Basics For Application 2018 free download, and many more programs.
MICROSOFT VISUAL BASIC FOR APPLICATIONS X400 HOW TO
This topic shows how to obtain the SMTP address for each recipient in a Recipients collection.