none
How Do I Refresh the Word document using C-Sharp after the Word 2010 Addin project loads programatically? RRS feed

  • Question

  • I have a word 2010 Addin project. I want to refresh the document when the project loads, so that I can get the the updated values into Document information panel.

    Thanks in Advance.


    Amol C kadam

    Thursday, January 12, 2012 4:54 AM

All replies

  • Amol,

    Can you tell me more detail about your requirement. I'll try my best to assistant.

    1. Does the addin change Document Information while loading?
    2. Why you need a refresh to the document?

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

    Monday, January 16, 2012 5:51 AM
    Moderator
  • Hi Forrest Guo,

    Thanks for offering me the help !

    I would like to refresh the entire Document information panel so that I can get the latest values from the sharepoint document library or list

    for  fields.

    I am replacing some fields values by another values. But  curently I got the previous values and when I run project next time, the latest

    values of the fields I got. But its not convinient for me to run project twice to get those latest values.

    Thanks !

     


    Amol C kadam
    Wednesday, January 18, 2012 10:25 AM
  • Amol,

    I don't quite understand words like "... so that I can get the latest values from the sharepoint document library or list for fields."

    While you say replacing *some* fields values, would you give me an example of this? I'm a bit confused at if you're modifying document contents or document properties. So, what kind of value do you change? Where do you change it, programmatically from addin, or from Document Information Panel manually?

    Best Regards,

    Wait for your reply.


    Forrest Guo | MSDN Community Support | Feedback to us

    Friday, January 27, 2012 3:05 AM
    Moderator
  • Hi Forrest Guo,

    What I did is, I have document information panel which loads the values from sharepoint library columns. In this , one column is of type "Dropdown", and it loads all values of dropdown options.  Now I have assigned the new values to dropdown option of type "Username" column from another SharePoint library.

    Now suppose, I have two items in the library of "Username" cloumn and both items contains different values to "username" column. If I run the word 2010 add-in project then it works properly means it shows two values of "username" column to dropdown option which are newly assigned . But now If I added new item to "username" column library with another username and run the word add-in project then the dropdown options shows only two values of username, means I did not get the last username value added when I have added third item of different username. But If I run the same add-ins project two times then It shows the all 3 differnet values of username column.

    Should I  refresh the docuemnt information panel ?

    or

    Word document itself?

    Hope this helps.

     Thanks !


    Amol C kadam
    • Edited by Amol C Kadam Wednesday, February 1, 2012 5:03 AM
    Tuesday, January 31, 2012 6:24 AM
  • Amol,

    I try to simulate the environment as you said, but still need more information:

    1. How can I form the library? is it via Form Library? See picture at bottom.
    2. How the value is passed to Word addin? It would be perfect to have details.

    Sorry to have more follow up question. It will be helpful for readers.


    Forrest Guo | MSDN Community Support | Feedback to us

    Wednesday, February 1, 2012 8:43 AM
    Moderator