Hi.

My PC recently crashed and thus my Excel 2007 was reinstalled. My code below used to work, but now I am receiving Invalid procedure call or argument message. Tried exactly the same exact code to a co-worker's pc and it works fine. Is there any particular setup or configuration in excel to make this work? Thanks for the help. Harold

Sub test()

    ActiveSheet.ExportAsFixedFormat _
      Type:=xlTypePDF, _
      Filename:="f:\x.pdf", _
      Quality:=xlQualityStandard, _
      IncludeDocProperties:=True, _
      IgnorePrintAreas:=False, _
      OpenAfterPublish:=True

End Sub