none
How to insert/fetch a cover page in word document using Microsoft.Office.Interop.Word; C# RRS feed

  • Question

  • Dear All,

    I'm creating a MsOffice template application to insert/evaluate the word document.

    I want to insert a cover page and later after changes in cover page then i want to evaluate it, using interop c#. I searched a lot on internet but i didn't find suitable one.

    Can any one please help me.

    Thanks

    Tuesday, May 23, 2017 8:05 AM

All replies

  • Hello,

    According to my test result, for particular cover page, we are unable to insert it correctly using code.

    For example, we could use the following VBA code to insert cover page,

          Application.Templates("C:\Users\" & Environ("UserName") & _
      "\AppData\Roaming\Microsoft\Document Building Blocks\1033\16\Built-In Building Blocks.dotx") _
      .BuildingBlockEntries("Austin").Insert Where:=Selection.Range, RichText:=True

    But the result 

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 25, 2017 9:46 AM
    Moderator