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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Apr 19, 2011, 7:21 AM
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
}
khan nazirPosted May 31, 2017, 1:12 PM
Suthish NairPosted Apr 21, 2011, 9:34 AM
Pravin GhadgePosted Apr 21, 2011, 7:26 AM
You are simply great........
Suthish NairPosted Apr 19, 2011, 5:36 AM
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 GhadgePosted Apr 19, 2011, 4:28 AM
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 NairPosted Apr 18, 2011, 3:40 PM