Experts,
Yesterday I tried to save a file.xlsx as file.pdf by ole coding and failed,
then i did the same thing on file.docx and succeeded.
So i 'm confused now and hope to make it clear whether it's possible to save a EXCEL as PDF by ole coding....
Below is my test coding of saving file.docx.
Any help will be appreciated *_*.
CREATE OBJECT lv_wordapp 'word.application'. SET PROPERTY OF lv_wordapp 'Visible' = 0. CALL METHOD OF lv_wordapp 'Documents' = lv_worddoc. CALL METHOD OF lv_worddoc 'Open' EXPORTING #1 = 'C:\Users\Administrator\Desktop\test.docx'. CALL METHOD OF lv_wordapp 'ActiveDocument' = lv_wordadoc. CALL METHOD OF lv_wordadoc 'Content' = lv_wordcont. CALL METHOD OF lv_wordadoc 'SaveAs' EXPORTING #1 = 'C:\Users\Administrator\Desktop\test.pdf' #2 = 17. "save as a PDF file CALL METHOD OF lv_wordapp 'Quit'. FREE OBJECT lv_wordapp .
Best Regards
Panda