Solved

How to copy attached file from a email public folders inbox

Posted on 2011-03-10
13
473 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

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
 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
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…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

738 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