"tommy Hermann" <(E-Mail Removed)> wrote in message
news:ae526d50-c2b3-478e-80e0-(E-Mail Removed)...
> Hi
>
> I have made a macro in VBA that is able to print pdf's from a folder
> and thereafter move the email's to another folder.
> My problem is, that the macro was based on adobe 9.0
> But in the meantime newer versions of adobe has showed up, and I
> cannot update the macro to a newer version.
>
> This is the sentance that i cannot change:
> Shell """C:\Programmer\Adobe\Reader 9.0\Reader\acrord32.exe"" /h /p
> """ + FileName + """", vbHide
The macro should work as is. The executable for 9.41 is acrord32.exe and it
is in the folder
"C:\Programmer\Adobe\Reader 9.0\Reader\"
Although I would change the line to:
Shell """C:\Programmer\Adobe\Reader 9.0\Reader\acrord32.exe"" /h /p
""" & FileName & """", vbHide
I assume all the quote marks are correct.
> If i change reader 9.0 to 9.4.1 the macro doens work.
>
> Here is the full programming:
>
> Public Sub PrintAttachments()
> Dim Inbox As MAPIFolder
> Dim Item As MailItem
> Dim Atmt As Attachment
> Dim FileName As String
> Dim topath As String
> Dim i As Integer
>
> Set Inbox =
> GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders.Item("Batch
> Prints")
> Set inbox1 =
> GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders.Item("Batch
> copy")
> For Each Item In Inbox.Items
> For Each Atmt In Item.Attachments
> 'all attachments are first saved in the temp folder C:
> \Temp. Be sure to create this folder.
> FileName = "C:\Temp\" & Atmt.FileName
> Atmt.SaveAsFile FileName
> 'please change the program folder accordingly if the
> Acrobat Reader is not installed on drive C:
> Shell """C:\Programmer\Adobe\Reader 9.0\Reader
> \acrord32.exe"" /h /p """ + FileName + """", vbHide
> Next
> Item.Move inbox1 'tommy
>
>
> Item.Delete 'remove this line if you don't want the email be
> deleted automatically
> Next
> Set Inbox = Nothing
> End Sub
>
> Best regards Tommy
|