waraq
Member
Hi! I would like to open a new e-mail with a command button from my application. This is the code that "I think will open a new e-mail pane":
PrivateSub Application_NewMail()
Dim objApp As Outlook.Application
Dim objExplorer As Outlook.Explorer
objApp = CreateObject("Outlook.Application")
objExplorer = objApp.ActiveExplorer
With objExplorer
If .IsPaneVisible(1) = FalseThen
.ShowPane(1, True)
EndIf
EndWith
EndSub
This code is not working like it should. But I know I'm doing something wrong, becouse this Outlook.Application and Outlook.Explorer are not define. Please would you guide me how to solve this problem.
Thank You
Waraq
PrivateSub Application_NewMail()
Dim objApp As Outlook.Application
Dim objExplorer As Outlook.Explorer
objApp = CreateObject("Outlook.Application")
objExplorer = objApp.ActiveExplorer
With objExplorer
If .IsPaneVisible(1) = FalseThen
.ShowPane(1, True)
EndIf
EndWith
EndSub
This code is not working like it should. But I know I'm doing something wrong, becouse this Outlook.Application and Outlook.Explorer are not define. Please would you guide me how to solve this problem.
Thank You
Waraq