Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Closing Outlook VBE from Excel

In outlook I instatiate outlook using the following.

Set objOutlook = GetObject(, "Outlook.Application")
' If outlook was not open then instantiate outlook
If objOutlook Is Nothing Then
Set objOutlook = CreateObject("Outlook.Application")
'HandleOutlook = True
End If

In Outlook in the Application_Startup() Event I then open the VBE so that I
can call an outlook macro from excel without any popups using the following

Set objNameSpace = Application.GetNamespace("MAPI")
Set objExplorer = Application.Explorers.Add(objNameSpace.Folders(1),
olFolderDisplayFolderOnly)
objExplorer.CommandBars.FindControl(, 1695).Execute
objExplorer.Close

My problem is that I cannot figure out how to close Outlook's VBE from Excel

I'd like to use the GetObject method then using the .Quit method, but I have
been unable to locate the appname for Outlooks VBE. Does anyone know the
appname and/or a better way to close Outlook's VBE?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Closing Outlook VBE from Excel

Quick correction... In Excel I instantiate outlook using the following

Set objOutlook = GetObject(, "Outlook.Application")
' If outlook was not open then instantiate outlook
If objOutlook Is Nothing Then
Set objOutlook = CreateObject("Outlook.Application")
'HandleOutlook = True
End If

In Outlook in the Application_Startup() Event I then open the VBE so that I
can call an outlook macro from excel without any popups using the following

Set objNameSpace = Application.GetNamespace("MAPI")
Set objExplorer = Application.Explorers.Add(objNameSpace.Folders(1),
olFolderDisplayFolderOnly)
objExplorer.CommandBars.FindControl(, 1695).Execute
objExplorer.Close

My problem is that I cannot figure out how to close Outlook's VBE from Excel

I'd like to use the GetObject method then using the .Quit method, but I have
been unable to locate the appname for Outlooks VBE. Does anyone know the
appname and/or a better way to close Outlook's VBE?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
VBA - Closing Outlook ajliaks[_34_] Excel Programming 1 August 29th 04 11:55 PM
Closing VB triggers closing Excel Minilek Excel Programming 2 August 6th 04 05:17 PM
Email - Outlook no Closing Session Nigel[_6_] Excel Programming 6 February 23rd 04 06:33 PM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM


All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"