Last post May 12, 2009 04:57 AM by starlet_gt
May 08, 2009 09:11 AM|starlet_gt|LINK
I am not sure wether my question is fall under ASP or VB but i am looking forward for solution.
I have a machine on which a micorsoft outlook working with exchange server. All emails related to my email address automaticlly download into my PST file. Now I want to run some procedure through which I can copy/move email attachments in one folder programaticlly
I have no idea where to start. should i write windows application over Visual Studio or can also create SSIS package with script. What name spaces will be required and how to perform this opration?
plz give any link to article because i have nothing in my mind rightnow.
May 08, 2009 11:23 AM|nmreddy83|LINK
you can use VSTO in .net to play with office applications
May 08, 2009 01:53 PM|UjjwalMeshram|LINK
May 09, 2009 12:31 PM|ahsanm.m|LINK
Using Visual Studio 2005/2008-> office programming for solve your problem,
here is some link for your consideration;
May 11, 2009 10:23 AM|starlet_gt|LINK
I have checked all links above but it come up with no results ...
May 12, 2009 04:57 AM|starlet_gt|LINK
I got one solution, What I did, I created a macro in outlook 2007. The below procedure scan unread emails in a defined folder and copy attachments on local drive, further mark all unread emails as read. hope this helps to people who are looking for the solution.
Dim ns As NameSpace
Dim Inbox As MAPIFolder
Dim SubFolder As MAPIFolder
Dim Item As Object
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer
On Error GoTo GetAttachments_err
Set ns = GetNamespace("MAPI")
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
Set SubFolder = Inbox.Folders("Write-Off Approvals")
i = 0
'Check for items in inbox
If SubFolder.UnReadItemCount = 0 Then
MsgBox "There are no messages in the Write-Off Approvals.", vbInformation, _
'Scan for attachments
For Each Item In SubFolder.Items
If (Item.UnRead) Then
For Each Atmt In Item.Attachments
FileName = "C:\Email Attachments\" & Atmt.FileName
i = i + 1
Item.UnRead = False
If i > 0 Then
MsgBox "I found " & i & " attached files." _
& vbCrLf & "I have saved them into the C:\Email Attachments folder." _
& vbCrLf & vbCrLf & "Have a nice day.", vbInformation, "Finished!"
MsgBox "I didn't find any attached files in your mail.", vbInformation, _
Set Atmt = Nothing
Set Item = Nothing
Set ns = Nothing
MsgBox "An unexpected error has occurred." _
& vbCrLf & "Please note and report the following information." _
& vbCrLf & "Macro Name: GetAttachments" _
& vbCrLf & "Error Number: " & Err.Number _
& vbCrLf & "Error Description: " & Err.Description _
& vbCrLf & "Error Line: " & Err.Source _
, vbCritical, "Error!"