>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)
>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.