A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Open current explorer in new window



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 6th 06, 09:37 AM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default Open current explorer in new window

Hello,

I want to open the current explorer in a new window.

Set objExplorer =
objExplorers.Add(Outlook.Session.GetDefaultFolder( olFolderCalendar),
olFolderDisplayFolderOnly)
objExplorer.Display

The code above works fine, but if I try this code for the current
folder nothing happens :-(

Set objExplorer =
objExplorers.Add(Outlook.ActiveExplorer.CurrentFol der,
olFolderDisplayFolderOnly)
objExplorer.Display

What can I do?

Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung

Ads
  #2  
Old December 6th 06, 02:24 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Open current explorer in new window

Can you get CurrentFolder as a MAPIFolder object and then pass that object
to the Add method?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message
ps.com...
Hello,

I want to open the current explorer in a new window.

Set objExplorer =
objExplorers.Add(Outlook.Session.GetDefaultFolder( olFolderCalendar),
olFolderDisplayFolderOnly)
objExplorer.Display

The code above works fine, but if I try this code for the current
folder nothing happens :-(

Set objExplorer =
objExplorers.Add(Outlook.ActiveExplorer.CurrentFol der,
olFolderDisplayFolderOnly)
objExplorer.Display

What can I do?

Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


  #3  
Old December 7th 06, 08:22 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default Open current explorer in new window

Hello Ken,

thanks for your answer.

I`m not sure if I understand you in the right way. I tried the
following with the same effect:

Sub OpenCurrentExplorer()

Dim objExplorer As Outlook.Explorer
Dim objExplorers As Outlook.Explorers
Dim objFolder As Outlook.MAPIFolder

Set objExplorers = Outlook.Explorers

Set objFolder = Outlook.ActiveExplorer.CurrentFolder
Set objExplorer = objExplorers.Add(objFolder,
olFolderDisplayFolderOnly)
objExplorer.Display

End Sub

Best regards
Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- and Outlook-Programming

Ken Slovak - [MVP - Outlook] schrieb:

Can you get CurrentFolder as a MAPIFolder object and then pass that object
to the Add method?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message
ps.com...
Hello,

I want to open the current explorer in a new window.

Set objExplorer =
objExplorers.Add(Outlook.Session.GetDefaultFolder( olFolderCalendar),
olFolderDisplayFolderOnly)
objExplorer.Display

The code above works fine, but if I try this code for the current
folder nothing happens :-(

Set objExplorer =
objExplorers.Add(Outlook.ActiveExplorer.CurrentFol der,
olFolderDisplayFolderOnly)
objExplorer.Display

What can I do?

Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung


  #4  
Old December 7th 06, 08:41 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Open current explorer in new window

It looks like you have to set the Explorer first using a different folder
than in ActiveExplorer, then after the Explorer is created set its
CurrentFolder object to the folder you want. Then display the Explorer. For
example if the current folder is Inbox then:

Sub OpenCurrentExplorer()

Dim objExplorer As Outlook.Explorer
Dim objExplorers As Outlook.Explorers
Dim objFolder As Outlook.MAPIFolder
Dim objFolder2 As Outlook.MAPIFolder

Set objExplorers = Outlook.Explorers

Set objFolder = Outlook.ActiveExplorer.CurrentFolder

Set objFolder2 = Outlook.Session.GetDefaultFolder(olFolderCalendar)

Set objExplorer = objExplorers.Add(objFolder2,
olFolderDisplayFolderOnly)

Set objExplorer.CurrentFolder = objFolder

objExplorer.Display

End Sub

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message
oups.com...
Hello Ken,

thanks for your answer.

I`m not sure if I understand you in the right way. I tried the
following with the same effect:

Sub OpenCurrentExplorer()

Dim objExplorer As Outlook.Explorer
Dim objExplorers As Outlook.Explorers
Dim objFolder As Outlook.MAPIFolder

Set objExplorers = Outlook.Explorers

Set objFolder = Outlook.ActiveExplorer.CurrentFolder
Set objExplorer = objExplorers.Add(objFolder,
olFolderDisplayFolderOnly)
objExplorer.Display

End Sub

Best regards
Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- and Outlook-Programming


  #5  
Old December 7th 06, 08:55 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 208
Default Open current explorer in new window

Aha, thanks a lot! Works fine!

Best regards
Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- and Outlook-Programming


Ken Slovak - [MVP - Outlook] schrieb:

It looks like you have to set the Explorer first using a different folder
than in ActiveExplorer, then after the Explorer is created set its
CurrentFolder object to the folder you want. Then display the Explorer. For
example if the current folder is Inbox then:

Sub OpenCurrentExplorer()

Dim objExplorer As Outlook.Explorer
Dim objExplorers As Outlook.Explorers
Dim objFolder As Outlook.MAPIFolder
Dim objFolder2 As Outlook.MAPIFolder

Set objExplorers = Outlook.Explorers

Set objFolder = Outlook.ActiveExplorer.CurrentFolder

Set objFolder2 = Outlook.Session.GetDefaultFolder(olFolderCalendar)

Set objExplorer = objExplorers.Add(objFolder2,
olFolderDisplayFolderOnly)

Set objExplorer.CurrentFolder = objFolder

objExplorer.Display

End Sub

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message
oups.com...
Hello Ken,

thanks for your answer.

I`m not sure if I understand you in the right way. I tried the
following with the same effect:

Sub OpenCurrentExplorer()

Dim objExplorer As Outlook.Explorer
Dim objExplorers As Outlook.Explorers
Dim objFolder As Outlook.MAPIFolder

Set objExplorers = Outlook.Explorers

Set objFolder = Outlook.ActiveExplorer.CurrentFolder
Set objExplorer = objExplorers.Add(objFolder,
olFolderDisplayFolderOnly)
objExplorer.Display

End Sub

Best regards
Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- and Outlook-Programming


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlinks in emails open a folder window, not Internet Explorer Jerom Outlook Express 3 August 6th 06 05:20 PM
Email hyperlinks open Windows Explorer, not Internet Explorer M Skabialka Outlook - General Queries 2 July 7th 06 09:39 PM
Automatically opening forwards as attachments in current message window [email protected] Outlook - General Queries 1 April 26th 06 11:44 PM
Open EML file from Internet Explorer Nathan Outlook Express 0 March 8th 06 05:42 AM
How do I get OFFICE 97 to OPEN Internet explorer Lost Outlook - Installation 1 February 12th 06 06:22 AM


All times are GMT +1. The time now is 12:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.