Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows10 print to pdf automation
Message
From
21/03/2016 08:11:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
21/03/2016 08:00:50
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01633396
Message ID:
01633417
Views:
234
>Hi Dragan and thank you for reply.
>
>Unfortunatly i unistalled all bureautic things as word, excel,

So have I :). That piece of code is from 2009.

>...there is a while and cannot test your
>code.i found in my archives an old code to save current file open in office2007
>
>#define wdFormatPDF 17
>oWord=createObject('word.application')
>lodoc=oWord.documents.open(getfile('doc'))
>loDoc.saveas("f:\mypdf",wdFormatPDF)  &&pdf
>loDoc.close()
>oword.quit
>
>if i remember it works with some addon must be installed at this time.

In Word 2007 it's already there, it's the W2003 that needs the add-on.

And thanks for your code - which I don't need either, but I guess we both may have helped someone else, or I may need it in some future, who knows. As to your problem, I was thinking... maybe if you used ShellExecute() with a /print parameter, and set the windows default printer to pdf before that, and restored it afterwards? Don't know how to pass the output filename in that case, but I guess you can google it out better than I can.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform