Sunday, January 7, 2018

convert early binding to late binding - vba outlook example

EARLY BINDING FOR OUTLOOK

**Add Reference to Microsoft Outlook Object Lib

Dim OutApp As New Outlook.Application

OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)


LATE BINDING FOR OUTLOOK

Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")

OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.