This is not difficult to do, but I am getting ActiveX Component Can't create object when I try to create an object. I have added a reference to Microsoft Word 15 Object Library.
and here is the code:
Dim objOutlookApp As Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objMail As Outlook.MailItem
'Set the application objects
Set objOutlookApp = GetObject("", "Outlook.Application")
If objOutlookApp Is Nothing Then
Set objOutlookApp = New Outlook.Application
Set objNameSpace = objOutlookApp.GetNamespace("MAPI")
End If
The error occurs on this line - Set objOutlookApp = GetObject("", "Outlook.application")
Intelligence works so the IDE is recognizing the objects.
Can anyone help and if not, anyone know The A Teams phone number?
and here is the code:
Dim objOutlookApp As Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objMail As Outlook.MailItem
'Set the application objects
Set objOutlookApp = GetObject("", "Outlook.Application")
If objOutlookApp Is Nothing Then
Set objOutlookApp = New Outlook.Application
Set objNameSpace = objOutlookApp.GetNamespace("MAPI")
End If
The error occurs on this line - Set objOutlookApp = GetObject("", "Outlook.application")
Intelligence works so the IDE is recognizing the objects.
Can anyone help and if not, anyone know The A Teams phone number?