Baffled, can record macro, and then RTE5. Macro works fine on another PC. Excel2007

Joined
Sep 27, 2011
Messages
2
Reaction score
0
Windows Server 2003, SP2.
All I want to do is open another excel sheet, and save it as a pdf.

I record it on the 2003 server and the functionality works. Opens the xls and saves as pdf. But if I run the macro I get RTE 5 (invalid procedure call or argument)

If i email the files to another PC Winodws 7, Office 2007, the macro works fine.

-----------------
Sub Macro2()
'
' Macro2 Macro
'

'
ChDir "C:\temp1"
Workbooks.Open Filename:="C:\temp1\ADOCERNERLabOrders.xls"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\temp1\results1.pdf", Quality:=xlQualityStandard, IncludeDocProperties:= _
False, IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
---------------------------------------------------

Any help would greatly be appreciated.

Thanks again,

Boyd
 
Issue resolved.

Bug with Office 2007 and pdf. needed to install Office 2007 SP2
 
thanks for reporting back, glad you got it sorted. :)


:user:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top