Creating Outlook application from Excel generates type mismatch error
up vote
1
down vote
favorite
I am trying to create an Outlook email using an Outlook template.
On the Set obApp = Outlook.Application
line, I am receiving the error:
Error: 13 Type Mismatch
I seem to be using the same syntax used in other posts on this site on the subject.
I also tried Set obApp = CreateObject("Outlook.Applciation")
with the same result.
I have OLE Automation, Microsoft Outlook 16.0 Object Library, Microsoft Office 16.0 Library, and Microsoft Excel 16.0 Object Library, and visual Basic for Applications all checked in Tools-> References.
Sub CreateEmailfromTemplate()
Dim obApp As Application
Dim NewMail As Outlook.MailItem
Set obApp = Outlook.Application 'THE PROBLEM IS HERE
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
excel vba outlook outlook-vba type-mismatch
add a comment |
up vote
1
down vote
favorite
I am trying to create an Outlook email using an Outlook template.
On the Set obApp = Outlook.Application
line, I am receiving the error:
Error: 13 Type Mismatch
I seem to be using the same syntax used in other posts on this site on the subject.
I also tried Set obApp = CreateObject("Outlook.Applciation")
with the same result.
I have OLE Automation, Microsoft Outlook 16.0 Object Library, Microsoft Office 16.0 Library, and Microsoft Excel 16.0 Object Library, and visual Basic for Applications all checked in Tools-> References.
Sub CreateEmailfromTemplate()
Dim obApp As Application
Dim NewMail As Outlook.MailItem
Set obApp = Outlook.Application 'THE PROBLEM IS HERE
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
excel vba outlook outlook-vba type-mismatch
If the code is in Outlook then no need to set application, simply use ‘Application.CreateItem’
– 0m3r
Nov 12 at 5:26
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am trying to create an Outlook email using an Outlook template.
On the Set obApp = Outlook.Application
line, I am receiving the error:
Error: 13 Type Mismatch
I seem to be using the same syntax used in other posts on this site on the subject.
I also tried Set obApp = CreateObject("Outlook.Applciation")
with the same result.
I have OLE Automation, Microsoft Outlook 16.0 Object Library, Microsoft Office 16.0 Library, and Microsoft Excel 16.0 Object Library, and visual Basic for Applications all checked in Tools-> References.
Sub CreateEmailfromTemplate()
Dim obApp As Application
Dim NewMail As Outlook.MailItem
Set obApp = Outlook.Application 'THE PROBLEM IS HERE
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
excel vba outlook outlook-vba type-mismatch
I am trying to create an Outlook email using an Outlook template.
On the Set obApp = Outlook.Application
line, I am receiving the error:
Error: 13 Type Mismatch
I seem to be using the same syntax used in other posts on this site on the subject.
I also tried Set obApp = CreateObject("Outlook.Applciation")
with the same result.
I have OLE Automation, Microsoft Outlook 16.0 Object Library, Microsoft Office 16.0 Library, and Microsoft Excel 16.0 Object Library, and visual Basic for Applications all checked in Tools-> References.
Sub CreateEmailfromTemplate()
Dim obApp As Application
Dim NewMail As Outlook.MailItem
Set obApp = Outlook.Application 'THE PROBLEM IS HERE
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
excel vba outlook outlook-vba type-mismatch
excel vba outlook outlook-vba type-mismatch
edited Nov 11 at 19:59
K.Dᴀᴠɪs
6,056112140
6,056112140
asked Nov 11 at 6:51
OrangeOwner
128
128
If the code is in Outlook then no need to set application, simply use ‘Application.CreateItem’
– 0m3r
Nov 12 at 5:26
add a comment |
If the code is in Outlook then no need to set application, simply use ‘Application.CreateItem’
– 0m3r
Nov 12 at 5:26
If the code is in Outlook then no need to set application, simply use ‘Application.CreateItem’
– 0m3r
Nov 12 at 5:26
If the code is in Outlook then no need to set application, simply use ‘Application.CreateItem’
– 0m3r
Nov 12 at 5:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
You have two options to choose from:
Option 1: Early Binding
In order to use early binding, you need to set a reference to:
Microsoft Outlook ##.# Object Library
Which can be done in the VBE > Tools > References. I assume this is the method you are preferring due to the way you have already declared your variables.
The issue in your code using this method is that in the statement Dim xxxx As Application
, As Application
is referring to Excel's Object Model. You need to specify you are wanting to use Outlook.
Sub CreateEmailfromTemplate()
Dim obApp As New Outlook.Application '<-- Notice Change
Dim NewMail As Outlook.MailItem
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Option 2: Late Binding
You will not need to set a reference in this method, but Outlook's types and constants will not be available at compile time. The compiler will obtain these during runtime.
Sub CreateEmailfromTemplate()
Dim obApp As Object
Dim NewMail As Object
Set obApp = CreateObject("Outlook.Application")
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Notice in this method Outlook's objects were declared as type Object
.
Worth mentioning that in case 1 (early binding) you can use theNew
syntax instead ofGetObject()
- i.eSet obApp = New Outlook.Application
, which I think feels a bit cleaner
– Greedo
Nov 11 at 9:56
1
@Greedo Depends - I wouldn't necessarily want to create a new object if one is already running. Could you imagine running this code 50 times and having 50 instances open? Sure, you could close the application at the end of the routine, but if the object already exists then why not use it? I probably could have added a check to see ifolApp Is Nothing
first and then proceed to create a new object.
– K.Dᴀᴠɪs
Nov 11 at 9:58
Ah so true, I mistakenly thought you were usingCreateObject()
as in the question. There's no early bound /New
style equivalent ofGetObject()
is there? Something likeSet obApp = Existing Outlook.Application
(which has the minor benefit of being able to dot through the library). And what scope doesGetObject()
look in - same method and publicly declared variables, or somehow global? Like should a parent method be worried about a child hijacking its instance in this way?
– Greedo
Nov 11 at 10:09
Unfortunately for both early and late binding, there is no equivalent ofAs New...
toGetObject()
. And with "...hijacking its instance in this way": I suppose this ultimately boils down to security. Any piece of malware could supposedly gain access to ActiveX/COM programs this way, which would be why it's important to keep your OS and antivirus software up to date, @Greedo.
– K.Dᴀᴠɪs
Nov 11 at 10:24
Oh no, I'm not suggesting anything so nefarious. All I'm wondering is whether under normal circumstances,GetObject
has sight of variables that are not in the method's scope. If Sub a hasSet a = CreateObject("foo.bar")
, can Sub b in a different scope doSet b = GetObject("foo.bar")
to geta
's object, whereSet b = a
would give a variable not defined error because of the difference in scope
– Greedo
Nov 11 at 10:38
|
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You have two options to choose from:
Option 1: Early Binding
In order to use early binding, you need to set a reference to:
Microsoft Outlook ##.# Object Library
Which can be done in the VBE > Tools > References. I assume this is the method you are preferring due to the way you have already declared your variables.
The issue in your code using this method is that in the statement Dim xxxx As Application
, As Application
is referring to Excel's Object Model. You need to specify you are wanting to use Outlook.
Sub CreateEmailfromTemplate()
Dim obApp As New Outlook.Application '<-- Notice Change
Dim NewMail As Outlook.MailItem
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Option 2: Late Binding
You will not need to set a reference in this method, but Outlook's types and constants will not be available at compile time. The compiler will obtain these during runtime.
Sub CreateEmailfromTemplate()
Dim obApp As Object
Dim NewMail As Object
Set obApp = CreateObject("Outlook.Application")
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Notice in this method Outlook's objects were declared as type Object
.
Worth mentioning that in case 1 (early binding) you can use theNew
syntax instead ofGetObject()
- i.eSet obApp = New Outlook.Application
, which I think feels a bit cleaner
– Greedo
Nov 11 at 9:56
1
@Greedo Depends - I wouldn't necessarily want to create a new object if one is already running. Could you imagine running this code 50 times and having 50 instances open? Sure, you could close the application at the end of the routine, but if the object already exists then why not use it? I probably could have added a check to see ifolApp Is Nothing
first and then proceed to create a new object.
– K.Dᴀᴠɪs
Nov 11 at 9:58
Ah so true, I mistakenly thought you were usingCreateObject()
as in the question. There's no early bound /New
style equivalent ofGetObject()
is there? Something likeSet obApp = Existing Outlook.Application
(which has the minor benefit of being able to dot through the library). And what scope doesGetObject()
look in - same method and publicly declared variables, or somehow global? Like should a parent method be worried about a child hijacking its instance in this way?
– Greedo
Nov 11 at 10:09
Unfortunately for both early and late binding, there is no equivalent ofAs New...
toGetObject()
. And with "...hijacking its instance in this way": I suppose this ultimately boils down to security. Any piece of malware could supposedly gain access to ActiveX/COM programs this way, which would be why it's important to keep your OS and antivirus software up to date, @Greedo.
– K.Dᴀᴠɪs
Nov 11 at 10:24
Oh no, I'm not suggesting anything so nefarious. All I'm wondering is whether under normal circumstances,GetObject
has sight of variables that are not in the method's scope. If Sub a hasSet a = CreateObject("foo.bar")
, can Sub b in a different scope doSet b = GetObject("foo.bar")
to geta
's object, whereSet b = a
would give a variable not defined error because of the difference in scope
– Greedo
Nov 11 at 10:38
|
show 3 more comments
up vote
2
down vote
You have two options to choose from:
Option 1: Early Binding
In order to use early binding, you need to set a reference to:
Microsoft Outlook ##.# Object Library
Which can be done in the VBE > Tools > References. I assume this is the method you are preferring due to the way you have already declared your variables.
The issue in your code using this method is that in the statement Dim xxxx As Application
, As Application
is referring to Excel's Object Model. You need to specify you are wanting to use Outlook.
Sub CreateEmailfromTemplate()
Dim obApp As New Outlook.Application '<-- Notice Change
Dim NewMail As Outlook.MailItem
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Option 2: Late Binding
You will not need to set a reference in this method, but Outlook's types and constants will not be available at compile time. The compiler will obtain these during runtime.
Sub CreateEmailfromTemplate()
Dim obApp As Object
Dim NewMail As Object
Set obApp = CreateObject("Outlook.Application")
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Notice in this method Outlook's objects were declared as type Object
.
Worth mentioning that in case 1 (early binding) you can use theNew
syntax instead ofGetObject()
- i.eSet obApp = New Outlook.Application
, which I think feels a bit cleaner
– Greedo
Nov 11 at 9:56
1
@Greedo Depends - I wouldn't necessarily want to create a new object if one is already running. Could you imagine running this code 50 times and having 50 instances open? Sure, you could close the application at the end of the routine, but if the object already exists then why not use it? I probably could have added a check to see ifolApp Is Nothing
first and then proceed to create a new object.
– K.Dᴀᴠɪs
Nov 11 at 9:58
Ah so true, I mistakenly thought you were usingCreateObject()
as in the question. There's no early bound /New
style equivalent ofGetObject()
is there? Something likeSet obApp = Existing Outlook.Application
(which has the minor benefit of being able to dot through the library). And what scope doesGetObject()
look in - same method and publicly declared variables, or somehow global? Like should a parent method be worried about a child hijacking its instance in this way?
– Greedo
Nov 11 at 10:09
Unfortunately for both early and late binding, there is no equivalent ofAs New...
toGetObject()
. And with "...hijacking its instance in this way": I suppose this ultimately boils down to security. Any piece of malware could supposedly gain access to ActiveX/COM programs this way, which would be why it's important to keep your OS and antivirus software up to date, @Greedo.
– K.Dᴀᴠɪs
Nov 11 at 10:24
Oh no, I'm not suggesting anything so nefarious. All I'm wondering is whether under normal circumstances,GetObject
has sight of variables that are not in the method's scope. If Sub a hasSet a = CreateObject("foo.bar")
, can Sub b in a different scope doSet b = GetObject("foo.bar")
to geta
's object, whereSet b = a
would give a variable not defined error because of the difference in scope
– Greedo
Nov 11 at 10:38
|
show 3 more comments
up vote
2
down vote
up vote
2
down vote
You have two options to choose from:
Option 1: Early Binding
In order to use early binding, you need to set a reference to:
Microsoft Outlook ##.# Object Library
Which can be done in the VBE > Tools > References. I assume this is the method you are preferring due to the way you have already declared your variables.
The issue in your code using this method is that in the statement Dim xxxx As Application
, As Application
is referring to Excel's Object Model. You need to specify you are wanting to use Outlook.
Sub CreateEmailfromTemplate()
Dim obApp As New Outlook.Application '<-- Notice Change
Dim NewMail As Outlook.MailItem
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Option 2: Late Binding
You will not need to set a reference in this method, but Outlook's types and constants will not be available at compile time. The compiler will obtain these during runtime.
Sub CreateEmailfromTemplate()
Dim obApp As Object
Dim NewMail As Object
Set obApp = CreateObject("Outlook.Application")
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Notice in this method Outlook's objects were declared as type Object
.
You have two options to choose from:
Option 1: Early Binding
In order to use early binding, you need to set a reference to:
Microsoft Outlook ##.# Object Library
Which can be done in the VBE > Tools > References. I assume this is the method you are preferring due to the way you have already declared your variables.
The issue in your code using this method is that in the statement Dim xxxx As Application
, As Application
is referring to Excel's Object Model. You need to specify you are wanting to use Outlook.
Sub CreateEmailfromTemplate()
Dim obApp As New Outlook.Application '<-- Notice Change
Dim NewMail As Outlook.MailItem
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Option 2: Late Binding
You will not need to set a reference in this method, but Outlook's types and constants will not be available at compile time. The compiler will obtain these during runtime.
Sub CreateEmailfromTemplate()
Dim obApp As Object
Dim NewMail As Object
Set obApp = CreateObject("Outlook.Application")
Set NewMail = obApp.CreateItemFromTemplate("F:Folder1AutomationEmailTemplatesTEST TEST.oft")
NewMail.Display
End Sub
Notice in this method Outlook's objects were declared as type Object
.
edited Nov 12 at 1:58
answered Nov 11 at 9:14
K.Dᴀᴠɪs
6,056112140
6,056112140
Worth mentioning that in case 1 (early binding) you can use theNew
syntax instead ofGetObject()
- i.eSet obApp = New Outlook.Application
, which I think feels a bit cleaner
– Greedo
Nov 11 at 9:56
1
@Greedo Depends - I wouldn't necessarily want to create a new object if one is already running. Could you imagine running this code 50 times and having 50 instances open? Sure, you could close the application at the end of the routine, but if the object already exists then why not use it? I probably could have added a check to see ifolApp Is Nothing
first and then proceed to create a new object.
– K.Dᴀᴠɪs
Nov 11 at 9:58
Ah so true, I mistakenly thought you were usingCreateObject()
as in the question. There's no early bound /New
style equivalent ofGetObject()
is there? Something likeSet obApp = Existing Outlook.Application
(which has the minor benefit of being able to dot through the library). And what scope doesGetObject()
look in - same method and publicly declared variables, or somehow global? Like should a parent method be worried about a child hijacking its instance in this way?
– Greedo
Nov 11 at 10:09
Unfortunately for both early and late binding, there is no equivalent ofAs New...
toGetObject()
. And with "...hijacking its instance in this way": I suppose this ultimately boils down to security. Any piece of malware could supposedly gain access to ActiveX/COM programs this way, which would be why it's important to keep your OS and antivirus software up to date, @Greedo.
– K.Dᴀᴠɪs
Nov 11 at 10:24
Oh no, I'm not suggesting anything so nefarious. All I'm wondering is whether under normal circumstances,GetObject
has sight of variables that are not in the method's scope. If Sub a hasSet a = CreateObject("foo.bar")
, can Sub b in a different scope doSet b = GetObject("foo.bar")
to geta
's object, whereSet b = a
would give a variable not defined error because of the difference in scope
– Greedo
Nov 11 at 10:38
|
show 3 more comments
Worth mentioning that in case 1 (early binding) you can use theNew
syntax instead ofGetObject()
- i.eSet obApp = New Outlook.Application
, which I think feels a bit cleaner
– Greedo
Nov 11 at 9:56
1
@Greedo Depends - I wouldn't necessarily want to create a new object if one is already running. Could you imagine running this code 50 times and having 50 instances open? Sure, you could close the application at the end of the routine, but if the object already exists then why not use it? I probably could have added a check to see ifolApp Is Nothing
first and then proceed to create a new object.
– K.Dᴀᴠɪs
Nov 11 at 9:58
Ah so true, I mistakenly thought you were usingCreateObject()
as in the question. There's no early bound /New
style equivalent ofGetObject()
is there? Something likeSet obApp = Existing Outlook.Application
(which has the minor benefit of being able to dot through the library). And what scope doesGetObject()
look in - same method and publicly declared variables, or somehow global? Like should a parent method be worried about a child hijacking its instance in this way?
– Greedo
Nov 11 at 10:09
Unfortunately for both early and late binding, there is no equivalent ofAs New...
toGetObject()
. And with "...hijacking its instance in this way": I suppose this ultimately boils down to security. Any piece of malware could supposedly gain access to ActiveX/COM programs this way, which would be why it's important to keep your OS and antivirus software up to date, @Greedo.
– K.Dᴀᴠɪs
Nov 11 at 10:24
Oh no, I'm not suggesting anything so nefarious. All I'm wondering is whether under normal circumstances,GetObject
has sight of variables that are not in the method's scope. If Sub a hasSet a = CreateObject("foo.bar")
, can Sub b in a different scope doSet b = GetObject("foo.bar")
to geta
's object, whereSet b = a
would give a variable not defined error because of the difference in scope
– Greedo
Nov 11 at 10:38
Worth mentioning that in case 1 (early binding) you can use the
New
syntax instead of GetObject()
- i.e Set obApp = New Outlook.Application
, which I think feels a bit cleaner– Greedo
Nov 11 at 9:56
Worth mentioning that in case 1 (early binding) you can use the
New
syntax instead of GetObject()
- i.e Set obApp = New Outlook.Application
, which I think feels a bit cleaner– Greedo
Nov 11 at 9:56
1
1
@Greedo Depends - I wouldn't necessarily want to create a new object if one is already running. Could you imagine running this code 50 times and having 50 instances open? Sure, you could close the application at the end of the routine, but if the object already exists then why not use it? I probably could have added a check to see if
olApp Is Nothing
first and then proceed to create a new object.– K.Dᴀᴠɪs
Nov 11 at 9:58
@Greedo Depends - I wouldn't necessarily want to create a new object if one is already running. Could you imagine running this code 50 times and having 50 instances open? Sure, you could close the application at the end of the routine, but if the object already exists then why not use it? I probably could have added a check to see if
olApp Is Nothing
first and then proceed to create a new object.– K.Dᴀᴠɪs
Nov 11 at 9:58
Ah so true, I mistakenly thought you were using
CreateObject()
as in the question. There's no early bound /New
style equivalent of GetObject()
is there? Something like Set obApp = Existing Outlook.Application
(which has the minor benefit of being able to dot through the library). And what scope does GetObject()
look in - same method and publicly declared variables, or somehow global? Like should a parent method be worried about a child hijacking its instance in this way?– Greedo
Nov 11 at 10:09
Ah so true, I mistakenly thought you were using
CreateObject()
as in the question. There's no early bound /New
style equivalent of GetObject()
is there? Something like Set obApp = Existing Outlook.Application
(which has the minor benefit of being able to dot through the library). And what scope does GetObject()
look in - same method and publicly declared variables, or somehow global? Like should a parent method be worried about a child hijacking its instance in this way?– Greedo
Nov 11 at 10:09
Unfortunately for both early and late binding, there is no equivalent of
As New...
to GetObject()
. And with "...hijacking its instance in this way": I suppose this ultimately boils down to security. Any piece of malware could supposedly gain access to ActiveX/COM programs this way, which would be why it's important to keep your OS and antivirus software up to date, @Greedo.– K.Dᴀᴠɪs
Nov 11 at 10:24
Unfortunately for both early and late binding, there is no equivalent of
As New...
to GetObject()
. And with "...hijacking its instance in this way": I suppose this ultimately boils down to security. Any piece of malware could supposedly gain access to ActiveX/COM programs this way, which would be why it's important to keep your OS and antivirus software up to date, @Greedo.– K.Dᴀᴠɪs
Nov 11 at 10:24
Oh no, I'm not suggesting anything so nefarious. All I'm wondering is whether under normal circumstances,
GetObject
has sight of variables that are not in the method's scope. If Sub a has Set a = CreateObject("foo.bar")
, can Sub b in a different scope do Set b = GetObject("foo.bar")
to get a
's object, where Set b = a
would give a variable not defined error because of the difference in scope– Greedo
Nov 11 at 10:38
Oh no, I'm not suggesting anything so nefarious. All I'm wondering is whether under normal circumstances,
GetObject
has sight of variables that are not in the method's scope. If Sub a has Set a = CreateObject("foo.bar")
, can Sub b in a different scope do Set b = GetObject("foo.bar")
to get a
's object, where Set b = a
would give a variable not defined error because of the difference in scope– Greedo
Nov 11 at 10:38
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246493%2fcreating-outlook-application-from-excel-generates-type-mismatch-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If the code is in Outlook then no need to set application, simply use ‘Application.CreateItem’
– 0m3r
Nov 12 at 5:26