How to Create word document Index page, Glossary page dynamically Using Microsoft.Office.Interop.Word. RRS feed

  • Question

  • Hi,

    I need to generate dynamic word document with Index and Glossary page in VS-2015 desktop application.

    can any one help me about how to generate Index and Glossary page dynamically?


    Monday, July 30, 2018 9:27 AM

All replies

  • Have you tried recording a macro when inserting the content you're interested in? That would give you the basic objects, methods and properties used.

    Since you don't even tell us which programming language you intend to use, there's not much more anyone can do to help at this stage. If you want more assistance you should add the code you already have for "interoping" with Word to your question, as well as the macro code that performs the actions you plan to use.

    Cindy Meister, Office Developer/Word MVP, <a href=""> my blog</a>

    Monday, July 30, 2018 4:03 PM
  • Hi Cindy,

    I have no code to show you.

    My requirement is, use .Net technologies (C#) to generate word document Index page and Glossary page dynamically.

    I used "Microsoft.Office.Interop.Word" dll reference to generate word document and it's working fine. Now i want to generate Index and Glossary page for generated word document and i have no idea how to generate this.

    Can you help me on generating Index page and Glossary page using .Net (C#) technologies any help means a lot for me.


    Tuesday, July 31, 2018 7:31 AM
  • I've given you tips on how you can research this, yourself. I'm happy to help with any barriers you run into writing your own code  - but I'm not going to spend hours writing your code for you. I get paid for that kind of work.

    Cindy Meister, Office Developer/Word MVP, <a href=""> my blog</a>

    Tuesday, July 31, 2018 8:24 PM
  • I suggest you first record a macro too. An VBA macro maybe not the final result you want, but it also uses word interop dll and it could help you know what the dll has done. You could even try to convert the record vba macro to C#.

    Wednesday, August 1, 2018 7:10 AM
  • thanks for all your suggestion Cindy and V.ISG.

    I have resolve my problem my self and it's working fine.


    • Proposed as answer by V.ISG Wednesday, August 1, 2018 7:20 AM
    Wednesday, August 1, 2018 7:14 AM
  • Glad to hear that, congratulations.

    Wednesday, August 1, 2018 7:20 AM