none
Event Handler for MS Word Addin Application Model Dialog Popup Opens and getting Styles RRS feed

  • Question

  • I need to detect the style programmatically of model dialog popup box in MS Word Addin application. So I just need to have a way of event handler for getting hit when open a dialog popup. Here I have attached a sample screenshot for a word addin inbuilt popup for paragraph styling.(font,background color etc)

    I think in some case I have to use native libraries for access the styles of word model dialog box.

    Thanks.


    Thursday, July 21, 2016 5:29 AM

Answers

All replies

  • Hi Indikaa,

    you had asked ,"need to detect the style programmatically of model dialog popup box in MS Word Addin application".

    well, here I want to tell you that there is no any event handler that execute when dialog popup.

    and also there is no any method or property in Word Object Model that can provide you to access "Modify Style" Popup.

    so there is no way to access that dialog.

    if you want to access paragraph related information then you need to accessing it using selecting the paragraph by code and then you can try to fetch the information that you want.

    Regards

    Deepak


    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.

    Thursday, July 21, 2016 8:26 AM
    Moderator
  • Hi Deepak,

    I apply below code to open inbuilt dialog box from code.Any how, can I access the properties such as font,background color etc from that window.

    From below dynamic variable I can set new property values in to windows,But I need to get default  properties of dialog box.

    var dialog = Globals.ThisAddIn.Application.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogFormatDefineStylePara];
    dynamic dialog = Globals.ThisAddIn.Application.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogFormatDefineStylePara];
    My intention is to get the MS Word appearance theme/styles especially in Dialog Boxes. It is not word document level properties such as paragraphs etc.


    Friday, July 22, 2016 5:10 AM
  • Hi KameshIndika,

    I find that you had created 2 threads for the same issue.

    and in other thread you got a answer of your issue.

    Here I mentioned the link of that thread below.

    Detect the Styling of Word Application Dialog Popup Windows C#

    It is already mark as Answered.

    on the base of that thread I assume that you got the answer for your issue.

    if not then let me know and update the status of this thread.

    Regards

    Deepak


    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.

    Monday, August 1, 2016 7:08 AM
    Moderator