L
LDMueller
I have Outlook 2003. Basically I have an email in my inbox and when I run
this macro, I want the email to be moved to the folder "Problem
Report\Laptop" and then open this folder. My code works fine, but it's the
last line
(e.g. objFolder.Display) that I don't like. I want to open the folder, but
not launch a new window. If I manually open different folders, new windows
don't open so I'm hoping to do the same with code. I'm limited to what I
know with VBA so this was the only code I could at least get working.
Here is my code:
' Opens folder Problem Report\Laptop
Dim objOlApp As Outlook.Application
Dim objRecipient As Outlook.Recipient
Set objOlApp = CreateObject("Outlook.Application")
Set objNS = objOlApp.GetNamespace("MAPI")
Set objRecipient = objNS.CreateRecipient("Problem Report")
Set objFolder = GetFolder("Mailbox - Problem Report\Laptop")
objFolder.Display 'Will launch new window
Any assistance would be greatly appreciated.
Thanks!
this macro, I want the email to be moved to the folder "Problem
Report\Laptop" and then open this folder. My code works fine, but it's the
last line
(e.g. objFolder.Display) that I don't like. I want to open the folder, but
not launch a new window. If I manually open different folders, new windows
don't open so I'm hoping to do the same with code. I'm limited to what I
know with VBA so this was the only code I could at least get working.
Here is my code:
' Opens folder Problem Report\Laptop
Dim objOlApp As Outlook.Application
Dim objRecipient As Outlook.Recipient
Set objOlApp = CreateObject("Outlook.Application")
Set objNS = objOlApp.GetNamespace("MAPI")
Set objRecipient = objNS.CreateRecipient("Problem Report")
Set objFolder = GetFolder("Mailbox - Problem Report\Laptop")
objFolder.Display 'Will launch new window
Any assistance would be greatly appreciated.
Thanks!