Link to home
Start Free TrialLog in
Avatar of Rog D
Rog DFlag for United States of America

asked on

Outlook Set Mapifolder to a string? How do I do that?

I have some code that I want to cycle through a certain Inbox and save the Attachments.  This Inbox may change but I do know the path..

"\\Mailbox - 3114 Test\Inbox"  one time
"\\Mailbox - 3115 Test\Inbox" next ...
       
        Dim myOlapp As Outlook.Application
        Dim myoMsg As Outlook.MailItem
        Dim myOFolder As Outlook.MAPIFolder
     
        myOlapp = CreateObject("Outlook.Application")
        myoMsg = myOlapp.CreateItem(Outlook.OlItemType.olMailItem)
 --     myOFolder  = "\\Mailbox - 3114 Westin\Inbox" -----

Here is where I get an error?  How do I set the folder to this string?

Thanks,

Rog
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial