snowbounduk
09-14-2010, 03:25 AM
Hi All,
I am using some code to save attahments. I am using the first seven characters of the filename and the extension (.mpp). However the attachment does not save with an extension.
Any help much appreciated.
Gordon
' Check each message for attachments
For Each Item In SubFolder.Items
For Each Atmt In Item.Attachments
' Check filename of each attachment and save if it has "mpp" extension
If Right(Atmt.FileName, 3) = "mpp" Then
' This path must exist! Change folder name as necessary. For this test Project Plans 1 - Change
FileName = "H:\Gordon Reports\Live Project Plans 1\" & Left(Atmt.FileName, 7) & "." & ExtString
Atmt.SaveAsFile FileName
i = i + 1
End If
I am using some code to save attahments. I am using the first seven characters of the filename and the extension (.mpp). However the attachment does not save with an extension.
Any help much appreciated.
Gordon
' Check each message for attachments
For Each Item In SubFolder.Items
For Each Atmt In Item.Attachments
' Check filename of each attachment and save if it has "mpp" extension
If Right(Atmt.FileName, 3) = "mpp" Then
' This path must exist! Change folder name as necessary. For this test Project Plans 1 - Change
FileName = "H:\Gordon Reports\Live Project Plans 1\" & Left(Atmt.FileName, 7) & "." & ExtString
Atmt.SaveAsFile FileName
i = i + 1
End If