PxPlus User Forum

Twitter Twitter Twitter

Author Topic: .doc to .pdf  (Read 715 times)

Danilo David

  • Member
  • **
  • Posts: 18
    • View Profile
.doc to .pdf
« on: January 05, 2022, 09:01:44 PM »
hello,

anyone who knows how to convert .doc file to pdf file using pxplus codes?

thanks, God bless
« Last Edit: January 06, 2022, 03:12:49 AM by Danilo David »

EVa

  • Gold Member
  • ****
  • Posts: 54
    • View Profile
    • EDIAS
Re: .doc to .pdf
« Reply #1 on: January 06, 2022, 03:24:41 AM »
Try this:

0010 ! Instantiate object
0020 LET W=NEW("*obj/word")
0030 !
0040 ! Open document
0050 LET PATH$="c:\temp\test.docx"
0060 LET DOC1=W'OPENDOCUMENT(PATH$)
0070 !
0080 ! SaveAs PDF file
0090 W'SAVEASDOCUMENT("c:\temp\nowpdf.pdf")
0100 !
0110 DROP OBJECT W
0120 END

-Eric-