Solved

How to copy attached file from a email public folders inbox

Posted on 2011-03-10
13
468 Views
Last Modified: 2012-05-11
I can able copy the attached file from my inbox but I dont know how to copy attached file from a public folders inbox or other specific folder.Please advise what need to change the line below to achive the target I just explained.
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
How to change the default folder as public folders inbox.

Your prompt response would be highly appreciated.
0
Comment
Question by:alam747
  • 7
  • 6
13 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35105778
I no longer have access to public folders to prove but try

ns.GetDefaultFolder(olPublicFoldersAllPublicFolders).folders("inbox")
or less likely
ns.GetDefaultFolder(olPublicFoldersAllPublicFolders)

Chris
0
 

Author Comment

by:alam747
ID: 35112815
Thanks for your advice.
In fact I tried and with the code it works well  
Set Inbox = ns.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("ttci expeditor")
but while I changed to
Set Inbox = ns.GetDefaultFolder(olMailbox621IndustrialSupplyPO).Folders("PO_FROM_JDE")
Its give me error "Could not complete the operation.One or more parameter values are not valid.
Please advice how to fix and copy the attached file from the mailbox folder PO_FROM_JDE").
Thanks in advance for your prompt reply.
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35112915
Are ypou saying you have a PST:

olMailbox621IndustrialSupplyPO

if so then try:

application.Session.Folders("olMailbox621IndustrialSupplyPO").Folders("PO_FROM_JDE")

Use whatever the PST is displayed as in the outlook explorer ... but any subfolder path has to be broken down with the folder syntax for each level.

application.Session.Folders("olMailbox621IndustrialSupplyPO").Folders("PO_FROM_JDE").folders("anotherlevel").folders("Yet another level")


Chris
0
 

Author Comment

by:alam747
ID: 35114442
Thanks I will try and let you know.
0
 

Author Comment

by:alam747
ID: 35133252
I used the way you advised it gave following error:
"Method or data member not found"
I defined like as below:
Dim Inbox As MAPIFolder
Set Inbox = Application.Session.Folders("olMailbox621IndustrialSupplyPO").Folders("PO_FROM_JDE")

Please advice whats the problem and how to fix it.

Thanks
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35133291
olMailbox621IndustrialSupplyPO is meant to be whatever the PSt is called

Chris
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:alam747
ID: 35136729
Sorry its not clear to me, how to know that its a PST. in the outlook its like ..
mailbox- 621 Industrial Supply PO    and under that there inbox and other folder, one of them is PO-FROM-JDE where all attached file resides. I want to copy these attached file to a specific folder of hard disk.

Please advice what need to be changed or define to reach this folder.
Thanks for your co-operation.
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35137132
In that case try:

Set Inbox = Application.Session.Folders("621 Industrial Supply PO").Folders("PO_FROM_JDE")
instead of
Set Inbox = Application.Session.Folders("olMailbox621IndustrialSupplyPO").Folders("PO_FROM_JDE")

If it still doesn't work then in the outlook explorer window select the root folder for the PST then select the VBE immediate window, (alt F11 followed by ctrl G) and in there type:

?application.ActiveExplorer.CurrentFolder.Name

And let me know what it returns

Chris
0
 

Author Comment

by:alam747
ID: 35141859
I tried but same error as before.
Would you explain more detail how to open outlook explorer and select the root folder ..

Thanks
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
ID: 35142794
In outlook itself you are trying to get the folder : mailbox- 621 Industrial Supply PO.

Select that folder then in the VBE do the other bits and return the output here as a paste of the text.

Chris
0
 

Author Closing Comment

by:alam747
ID: 35144186
Thanks a lot for prompt response whiich helps and work excellent.
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35144811
You sussed the need to resolve the PST folder name so well done on making that final change yourself.

Glad to help
Chris
0
 

Author Comment

by:alam747
ID: 35146381
Thanks a lot for your advice. I appreciate your prompt response for the resolution.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now