none
Creating a new Field Code for MS Word using Visual Studio tools for office. RRS feed

  • Question

  • I have created an add in which is showing certain fields and every field has a certain data in it. Now when I drag and drop the field on Word document page, the value comes written over there. That is fine till now. But what I would like to do next is I want it to be like when we insert a new field from Quick Parts section it leaves a special format to show the value against that field e.g when we insert "Author" field it give me name "Aqib" and when I toggle the field code it gives a special syntax which is used to show the Author's name. I exactly wanna do the same thing that when I drag and drop the field from newly created addin, it should give its values according to the formula I would have set. Please help me in this matter. Any help in this matter would be appreciated.


    Monday, February 18, 2013 10:59 AM

All replies

  • Please specify

    1. Version of Word

    2. Version of VSTO

    <<Now when I drag and drop the field on Word document page, the value comes written over there. >>

    3. What you mean by "field"? From where are you dragging and dropping this "field"? Is this a content control that you've linked to a database?

    <<when we insert "Author" field it give me name "Aqib" and when I toggle the field code it gives a special syntax which is used to show the Author's name>>

    Please show us an example of the field code (Author).

    Note: I think I understand what it is you're asking, but I want to be absolutely certain. Otherwise, we may end up talking at cross-purposes (not about the same thing).


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, February 18, 2013 11:35 AM
    Moderator