Hi friends,
I have to download all attchment file in our PC folder.
Is it Possible?
If yes Plz give me solution or Idea
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Apr 19, 2011, 3:21 AM EDT
using OutlookApplication = Microsoft.Office.Interop.Outlook;
OutlookApplication._Application olApp = new OutlookApp.ApplicationClass();
OutlookApplication._NameSpace olNS = olApp.GetNamespace("MAPI");
olNS.Logon("your default outlook profile name", Missing.Value, false, false);
OutlookApplication._SyncObject _syncObject = null;
_syncObject = olNS.SyncObjects[1];
_syncObject.Start();
System.Threading.Thread.Sleep(30000);
_syncObject.Stop();
_syncObject = null;
Microsoft.Office.Interop.Outlook.MAPIFolder myInbox = olNS.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
//SAVE FILE
}
Suthish NairRank #92 · 22.8K reputationPosted Apr 18, 2011, 11:40 AM EDT
Pravin GhadgeRank #1,340 · 1.3K reputationPosted Apr 19, 2011, 12:28 AM EDT
I want to read only unread mails having attachment of .rar or .zip & then download that file only
then make that mail as readable.so next time that attachmnt should not be downloaded.
Plz.. show me sample.
Thanking you
Pravin
Suthish NairRank #92 · 22.8K reputationPosted Apr 19, 2011, 1:36 AM EDT
You need to generate sql statement to query the outlook inbox.
http://msdn.microsoft.com/en-us/library/aa123730(v=exchg.65).aspx
http://blogs.msdn.com/b/andrewdelin/archive/2005/05/11/416312.aspx
Pravin GhadgeRank #1,340 · 1.3K reputationPosted Apr 21, 2011, 3:26 AM EDT
You are simply great........
Suthish NairRank #92 · 22.8K reputationPosted Apr 21, 2011, 5:34 AM EDT
khan nazir3 reputationPosted May 31, 2017, 9:12 AM EDT