Excel automation well in one system and error in other ?

gvgbabu

Member
Joined
Sep 22, 2013
Messages
11
Programming Experience
Beginner
I have a program which do total process in Excel using VS2010. In the last, the output format I have changed as pdf from Excel using exportasfixedformat. In both places same versions of Excel, acrobat reader and Windows.

It works well in the my computer, but not in my office computer. It showing following error at the following statement:

oWs.ExportAsFixedFormat( _
Excel.XlFixedFormatType.xlTypePDF, _
fpath & "\" & "12345.pdf", _
Excel.XlFixedFormatQuality.xlQualityStandard, _
True, _
True, _
1, _
10, _
False)

Error is:

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

What went wrong?

gvg
 
Back
Top