If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Getting started with VBA
RON wrote:
I wrote a little routine: Private Sub Test() Dim ThisEmail As Object Dim ol As Object Set ol = CreateObject("Outlook.Application") Set ThisEmail = ol.ActiveInspector.CurrentItem 'Errror 91 here end sub which I run from ThisOutlookSession (Outlook 2003). But even this, emits a Error 91 Object variable not set error. Outlook is open to the inbox. This is not the programnming group. You want news://msnews.microsoft.com/microsof...ok.program_vba . I have set the follow up to that group. -- Brian Tillman |
Ads |
#2
|
|||
|
|||
Getting started with VBA
Please don't call CreateObject from within Outlook VBA. There's one Application object already created that you should use. ActiveInspector is valid if there's at least one Inspector opened, whereas the object that shows folders (the Inbox e.g.) is called Explorer. So what you probably want to access is the ActiveExplorer property. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Keep your Outlook categories organized! http://www.shareit.com/product.html?...4&languageid=1 (German: http://www.VBOffice.net/product.html?pub=6) Am Tue, 9 Jan 2007 15:42:42 -0500 schrieb Brian Tillman: RON wrote: I wrote a little routine: Private Sub Test() Dim ThisEmail As Object Dim ol As Object Set ol = CreateObject("Outlook.Application") Set ThisEmail = ol.ActiveInspector.CurrentItem 'Errror 91 here end sub which I run from ThisOutlookSession (Outlook 2003). But even this, emits a Error 91 Object variable not set error. Outlook is open to the inbox. This is not the programnming group. You want news://msnews.microsoft.com/microsof...ok.program_vba . I have set the follow up to that group. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting started | laura | Outlook - General Queries | 5 | August 26th 06 05:43 AM |
OE could not be started | ttago | Outlook Express | 11 | May 6th 06 07:05 PM |
how do i get started | Alias | Outlook Express | 6 | March 5th 06 08:45 AM |
Help getting started!! | hasnain mir mohammed | Outlook Express | 2 | January 15th 06 10:21 AM |
Getting Started | Charlie Tame | Outlook Express | 0 | January 7th 06 09:46 PM |