Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / December 2005

Tip: Looking for answers? Try searching our database.

create a macro to open public folder?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lisbeth - 28 Dec 2005 14:19 GMT
Regularly, I have to drill down through 4 folders to reach the public c
alendar.  How EXACTLY (spell it out please!) do I create a macro to do this
with one keystroke combo?
Rsoutlook.com - 28 Dec 2005 16:33 GMT
Private Sub cmdLink_Click()

Dim myExplorer As Object
Dim myNameSpace As Outlook.NameSpace
Dim myFolder, myFolder1, myFolder2, myFolder3, myFolder4 As
Outlook.MAPIFolder
Dim myFolders As Outlook.Folders
Set myNameSpace = Application.GetNamespace("MAPI")

Set myFolders = myNameSpace.Folders("Public Folders").Folders
 For Each myFolder In myFolders
   If myFolder.name = "All Public Folders" Then
     For Each myFolder1 In myFolder.Folders
       If myFolder1.name = "PT" Then
         For Each myFolder2 In myFolder1.Folders
           If myFolder2.name = "Help Desk Application" Then
             For Each myFolder3 In myFolder2.Folders
               If myFolder3.name = "PTHelp" Then
                 frmnovoAHT.Hide
                 Set myExplorer = myFolder3.GetExplorer
                 myExplorer.Activate
                 Call myFolder3.Display
                 Exit Sub
               End If
             Next
           End If
         Next
       End If
     Next
   End If
 Next
End Sub

Signature

Ricardo Silva [Outlook MVP]
Add-ins for Microsoft(c) Outlook(c)
http://www.rsoutlook.com/us/products.html

lisbeth - 28 Dec 2005 17:20 GMT
Sorry - stupid me.  Do I cut and paste your post somewhere?  Where EXACTLY?  
Thank you!

> Private Sub cmdLink_Click()
>
[quoted text clipped - 28 lines]
>   Next
> End Sub
Rsoutlook.com - 28 Dec 2005 17:58 GMT
In VBE (ALT+F11), insert> module, then insert>procedure and paste the code
you can then create a function to call the procedure, and voila.

Signature

Ricardo Silva [Outlook MVP]
Add-ins for Microsoft(c) Outlook(c)
http://www.rsoutlook.com/us/products.html

lisbeth - 28 Dec 2005 18:15 GMT
Thank you!

> In VBE (ALT+F11), insert> module, then insert>procedure and paste the code
> you can then create a function to call the procedure, and voila.
lisbeth - 28 Dec 2005 18:22 GMT
Get an INVALID PROCEDURE name message - I'm saying
"open calendar" (no quotes) What do I do EXACTLY?  Thanks.

> In VBE (ALT+F11), insert> module, then insert>procedure and paste the code
> you can then create a function to call the procedure, and voila.
jaf - 28 Dec 2005 20:31 GMT
Hi,
The code posted starts with "Private Sub cmdLink_Click()" which means you
need to click a button on your form to run the code.
I'm assuming you don't have a form. So it won't work.

Signature

John
johnf202 at hot mail dot com

> Get an INVALID PROCEDURE name message - I'm saying
> "open calendar" (no quotes) What do I do EXACTLY?  Thanks.
>
>> In VBE (ALT+F11), insert> module, then insert>procedure and paste the
>> code
>> you can then create a function to call the procedure, and voila.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.