It should be

Shell "c:\Program Files\Adobe\Acrobat 8.0\Reader\AcroRd32.exe /p /h " & FileName

because the variable FileName includes the filename and path. Atmt.FileName won't be found since it's a temporary file attached to your email.

--JP


Quote Originally Posted by pitspawn8
[vba]Sub GetAttachments()


Dim ns As NameSpace
Dim Inbox As MAPIFolder
Dim Item As Object
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer

Set ns = GetNamespace("MAPI")
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
i = 0

If Inbox.Items.Count = 0 Then
MsgBox "There are no messages in the Inbox.", vbInformation, _
"Nothing Found"
Exit Sub
End If

For Each Item In Inbox.Items
For Each Atmt In Item.Attachments
FileName = "C:\Email Attachments\" & Atmt.FileName
Atmt.SaveAsFile FileName
Shell "c:\program files\adobe\acrobat 8.0\reader\acrord32.exe /p /h " & Atmt.FileName
[/vba]