none
Is it possible to Create/print PDF using Microsoft Word's 2010 PDF Capability ? RRS feed

  • Question

  • 
    

    I am wondering..Is it possible to Create/print PDF using Microsoft Word's 2010 PDF Capability.. Programmitically ??

    like Doc/docx to pdf without using third party convertors like ASPOSE. 


    Contact["name"] = "Vin.k.s"; Contact["location"] = ?

    Friday, August 24, 2012 5:20 AM

Answers

  • Hi vin.ks

    <<Actually i was thinking to getReference of the com(dll) that works behind the PDF printing process..>>

    The functionality contained within an Office application (such as printing) can only be used within the context of that application. This functionality isn't available outside the application. To put it another way: it's only available when automating the application using COM - it's not possible to access it in any other way.

    Closest you can get to what you describe is the Word Automation Services I mentioned before.


    Cindy Meister, VSTO/Word MVP

    • Marked as answer by ViN.k.S Thursday, August 30, 2012 7:41 AM
    Monday, August 27, 2012 11:19 AM
    Moderator

All replies

  • Quite easily, using the SaveAs2 method. For example:

    ActiveDocument.SaveAs2 FileName:="Text.rtf", FileFormat:=wdFormatPDF
    or
    ActiveDocument.SaveAs2 FileName:="Text.rtf", FileFormat:=17


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, August 24, 2012 6:45 AM
  • That's means i have to go for Office Introp using COM :( :(

    I had a very bad exp with COM Programming..

    any other alternatives..


    Contact["name"] = "Vin.k.s"; Contact["location"] = ?

    Friday, August 24, 2012 9:57 AM
  • That's means i have to go for Office Introp using COM :( :(

    I had a very bad exp with COM Programming..

    any other alternatives..

    This forum targets the Word APIs, primarily, so if you don't want to use COM programming this may not be the best place to ask...

    One possibility would be to use the Word Automation Services, which is part of Sharepoint (msdn.microsoft.com/en-us/library/ee558830).

    The other approach would be to transform the docx file. A docx file is a "zip package" of xml files and both file formats are publicly available. The starting point for this would be OpenXmlDeveloper.org


    Cindy Meister, VSTO/Word MVP

    Friday, August 24, 2012 2:03 PM
    Moderator
  • That's means i have to go for Office Introp using COM :( :(

    I had a very bad exp with COM Programming..

    any other alternatives..

    This forum targets the Word APIs, primarily, so if you don't want to use COM programming this may not be the best place to ask...

    One possibility would be to use the Word Automation Services, which is part of Sharepoint (msdn.microsoft.com/en-us/library/ee558830).

    The other approach would be to transform the docx file. A docx file is a "zip package" of xml files and both file formats are publicly available. The starting point for this would be OpenXmlDeveloper.org


    Cindy Meister, VSTO/Word MVP

    Ok...

    Actually i was thinking to getReference of the com(dll) that works behind the PDF printing process..

    using which i can canvert other office docs also.. :


    Contact["name"] = "Vin.k.s"; Contact["location"] = ?

    Monday, August 27, 2012 7:21 AM
  • Hi vin.ks

    <<Actually i was thinking to getReference of the com(dll) that works behind the PDF printing process..>>

    The functionality contained within an Office application (such as printing) can only be used within the context of that application. This functionality isn't available outside the application. To put it another way: it's only available when automating the application using COM - it's not possible to access it in any other way.

    Closest you can get to what you describe is the Word Automation Services I mentioned before.


    Cindy Meister, VSTO/Word MVP

    • Marked as answer by ViN.k.S Thursday, August 30, 2012 7:41 AM
    Monday, August 27, 2012 11:19 AM
    Moderator
  • Thanks Cindy..

    You cleared many of my doubt.. without asking..  :)

    

    Contact["name"] = "Vin.k.s"; If it helps, Mark as answer to help others..

    Monday, August 27, 2012 12:34 PM