![]() |
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
|
|||
|
|||
![]()
I've got the following sub that is intended to open a new Explorer and
display the specified folder. It works on my home laptop but when I try to use it on a machine connected to Exchange it craps out. The problem appears to be at this line where the object is not being instantiated. Any Ideas? [set objNamespace = objOutlook.GetNamespace("MAPI")] sub displayFolder(sourceObject) 'Display the folder in a new Explorer window set objOutlook = ObjectCenterTopOutlookViewControl.outlookApplicati on set ovc = document.getElementById(sourceObject) 'From http://www.outlookcode.com/d/code/getfolder.htm Dim aFolders Dim fldr Dim i Dim objNS set objNamespace = objOutlook.GetNamespace("MAPI") 'On Error Resume Next strFolderPath = Replace(ovc.folder,"\\","") strFolderPath = Replace(strFolderPath, "/", "\") aFolders = Split(strFolderPath, "\") 'get the Outlook objects 'set the root folder Set fldr = objNamespace.Folders(aFolders(0)) 'loop through the array to get the subfolder 'loop is skipped when there is only one element in the array For i =1 To UBound(aFolders) Set fldr = fldr.Folders(aFolders(i)) 'check for errors If Err 0 Then msgbox(Err.number & " " & Err.Description) Exit Sub end if Next Set GetFolder = fldr ' de-reference objects Set objNS = Nothing GetFolder.display set objExplorer = GetFolder.GetExplorer 'Hide preview pane objExplorer.ShowPane 3, False 'Hide navigation pane objExplorer.ShowPane 4, False 'Hide Todo pane objExplorer.ShowPane 5, False end sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
home page of Outlook | jean | Outlook - General Queries | 1 | March 20th 10 09:47 AM |
Appointment Body on Custom Page 2- Hide Default Page | nuberbc | Outlook - Using Forms | 2 | January 19th 10 11:52 PM |
Folder Home Page | BryanC | Outlook - Using Forms | 3 | February 20th 09 06:01 PM |
Home Page Re-Direct | WonhungLo | Outlook Express | 2 | April 29th 07 01:32 AM |
running regsvr32.exe vbscript.dll does not help me open outlook | Mossy and Madam | Outlook - Installation | 3 | May 11th 06 07:09 PM |