none
What's the best Script Enginge to use for Office (Word) automation RRS feed

  • Question

  • I'm in the analyse/design phase of a project using scripts to automate the creation process of Word documents based on different templates. From the application I will call scipts which handles all the Automation stuff to have a isolation layer to my application (not all automation changes have influences to the application - no rebuild and deployment of the application).

    The part is: I have searched for several help in the internet but most help found for old script stuff in VBScript! Make's it sense to use PowerShell or is it better to still use VBScript?
    What's the common meaning about how long the VBScript will still available on client side?

    Thanks for any sugestions

    Friday, October 30, 2015 8:32 AM

Answers

  • Hi,

    Based on my understanding, we are using Office object model when we automate the Office application. There is nothing means that the "best Script Enginge". I suggest that you choose the script you were familiar.

    And to create an Word document, we can use Documents.Add method. This example creates and opens a new template, using the template attached to the active document as a model.

    tmpName = ActiveDocument.AttachedTemplate.FullName 
    Documents.Add Template:=tmpName, NewTemplate:=True
    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by mjeh1 Friday, November 6, 2015 2:46 PM
    Friday, November 6, 2015 6:14 AM
    Moderator

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the MSDN forum for Office Dev

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=officegeneral&filter=alltypes&sort=lastpostdesc

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    George Zhao
    TechNet Community Support


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com.
    Wednesday, November 4, 2015 1:38 AM
  • Hi,

    Based on my understanding, we are using Office object model when we automate the Office application. There is nothing means that the "best Script Enginge". I suggest that you choose the script you were familiar.

    And to create an Word document, we can use Documents.Add method. This example creates and opens a new template, using the template attached to the active document as a model.

    tmpName = ActiveDocument.AttachedTemplate.FullName 
    Documents.Add Template:=tmpName, NewTemplate:=True
    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by mjeh1 Friday, November 6, 2015 2:46 PM
    Friday, November 6, 2015 6:14 AM
    Moderator
  • Hi mjeh

    Could you provide more detail about where your project should run? On a client machine or server-side? Would the code be running on the client machine or on a server? Do you require interaction with the user inside the Word application?

    From what you do tell us, my first reaction is to point you at the Open XML SDK that will enable you to create documents without working with the Word application. This means it will function in a server environment (also works client-side). It's also faster than automating Word.


    Cindy Meister, Office Developer/Word MVP, <a href="http://blogs.msmvps.com/wordmeister"> my blog</a>

    Monday, November 9, 2015 9:09 PM
    Moderator