VBScript Wizardry
Andrew Kluthe
andrew at ctech.me
Tue Sep 11 16:52:26 EDT 2012
What I ended up doing here was using this vbscript to handle it from the shell.
http://www.suodenjoki.dk/us/productions/articles/word2pdf.htm
In case it can help anyone else.
On Tue, Sep 11, 2012 at 3:21 PM, Andrew Kluthe <andrew at ctech.me> wrote:
> Hello,
>
> Trying to use VBScript to turn an open word document into a pdf file.
>
> From looking at
>
> http://stackoverflow.com/questions/8807153/vbscript-to-convert-word-doc-to-pdf
>
> and
>
> http://www.robvanderwoude.com/vbstech_automation_word.php#SaveAsPDF
>
> it seems what with word 2010 or word 2007 with an add-on I can use vb
> script to convert a word document into a pdf.
>
> I get an execution error in "the result" when I try this code.
>
> if there is a file tReportFile then
> launch document tReportFile
> answer thePDFFileName
> put "Set objDoc = .ActiveDocument" & cr after sScript
> put "objDoc.SaveAs " & quote & thePDFFileName & quote & ",
> wdFormatPDF" & cr after sScript
> answer sScript
> do sScript as "vbscript"
> answer the result
> end if
>
> The document launches in word and but I get an execution error in "the
> result" when the vbscript is ran.
>
> Are there any VBScript/LiveCode wizards out there that could help?
>
> --
> Regards,
>
> Andrew Kluthe
> andrew at ctech.me
--
Regards,
Andrew Kluthe
andrew at ctech.me
More information about the use-livecode
mailing list