vbscript to convert word doc to pdf

前端 未结 4 957
攒了一身酷
攒了一身酷 2021-01-16 14:12

I have written a short vbscript that opens a word document, edits a few bookmarks and saves to a new .doc file.

I now need to convert this to a pdf file, which is st

4条回答
  •  Happy的楠姐
    2021-01-16 14:44

    According to MS you can save as/to PDF in Word 2010 without add-ons; Word 2007 needs an add-on, see here for VBScript code. In either case, something like

    objDoc.SaveAs , wdFormatPDF
    

    should do the trick without involving a 'printer'.

    For antique versions of Word the options are (in order of effort/gain ratio):

    1. update Word
    2. Record a macro of printing to the PDF printer and port the code to VBScript

提交回复
热议问题