Solved

How to copy attached file from a email public folders inbox

Posted on 2011-03-10
13
470 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

I wanted to share this with fellow Experts, who might not know. How often have you wanted to learn something, only to be set back by either restrictions imposed on "trial" or "evaluation" software?  How often have you had to rebuild a home networ…
This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

813 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

11 Experts available now in Live!

Get 1:1 Help Now