Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2006, 09:44 AM
Registered User
 
Join Date: Jun 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Activate Outlook and open a specific mailfolder

Hello

I have this script. It opens Outlook and active/open my Inbox

Function Open_OutLook()

   Dim oOutlook As Object
   Dim oNameSpace As Object
   Dim oInbox As Object

   Set oOutlook = CreateObject("Outlook.Application")

   Set oNameSpace = oOutlook.GetNamespace("MAPI")

   Set oInbox = oNameSpace.Folders(1)

   Set oInbox = oInbox.Folders("Inbox")

   oInbox.Display

End Function

Now I have 2 questions:
1) If my Outlook is open I just want to activate it instead of opening another copy, how do I do that ?
2) If I want to open a subfolder to Inbox, how do I do that ?

Thanks


/Mats





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you open a specific record from a search? Szimmer9 VB How-To 1 March 31st, 2006 12:57 AM
Open a PDF to a Specific Bookmark SerranoG Access VBA 2 March 7th, 2006 04:17 PM
Heighlight specific text when open file in browser salman Classic ASP Databases 1 May 5th, 2004 02:07 PM
Heighlet Specific Word when open file in a browser salman Classic ASP Databases 1 March 30th, 2004 06:30 AM
Heighlet specific Text when open file in browser salman Classic ASP Databases 0 March 30th, 2004 05:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.