none
Inconsistencies with my add in RRS feed

  • Question

  • Hi ,

    My add in works fine with the default ms word settings on my system, but when I gave to another person , the add in options are showing certain inconsistencies like the  'no spacing between paragraphs of same style' property has changed , toc is picking up even 'Title' styles along with 'heading 1' and 'Heading 2'  , all the alignment of bullets, numbered bullets have changed,etc a lot more 

    Upon further looking at their document I could see the changes under "Change Styles" menu in word and could see all the properties i had applied when the button click event occurred seemed to be over ridden .

    Is there a way to automatically restore ms word default normal template and over ride any users' applied template when the add in loads,programatically .Have been trying to search for a work around for this , any guidance would be of great help .Thanks.

    Thursday, February 26, 2015 5:19 AM

Answers

  • Hi Apoorva,

    >> Upon further looking at their document I could see the changes under "Change Styles" menu in word and could see all the properties i had applied when the button click event occurred seemed to be over ridden

    Have you found out which word default setting made your add work inconsistencies? If you have, I think you could change the Normal.dotm file style with vba to change the defualt settings. Some key code like below:

    Sub ChangeDefaultFont()
    Documents.Open FileName:="Normal.dotm", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
    With ActiveDocument.Styles(wdStyleNormal).Font
        .Name = "Calibri"
        .Size = 12
    End With
    ActiveDocument.Save
    ActiveDocument.Close
    End Sub

    >> Is there a way to automatically restore ms word default normal template and over ride any users' applied template when the add in loads,programmatically

    If you want to reset the default MS Word settings as the users' settings, one easiest way is to allow Word to recreate the Normal.dot template. While this will restore some settings to their first-used state (such as macros, toolbars, and the like), it will not do the entire trick. But if you want to automatically restore ms word default normal template when loading the add in, it might be much complex.

    Best Regards,

    Edward


    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.


    Friday, February 27, 2015 9:45 AM

All replies

  • Hi Apoorva,

    >> Upon further looking at their document I could see the changes under "Change Styles" menu in word and could see all the properties i had applied when the button click event occurred seemed to be over ridden

    Have you found out which word default setting made your add work inconsistencies? If you have, I think you could change the Normal.dotm file style with vba to change the defualt settings. Some key code like below:

    Sub ChangeDefaultFont()
    Documents.Open FileName:="Normal.dotm", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
    With ActiveDocument.Styles(wdStyleNormal).Font
        .Name = "Calibri"
        .Size = 12
    End With
    ActiveDocument.Save
    ActiveDocument.Close
    End Sub

    >> Is there a way to automatically restore ms word default normal template and over ride any users' applied template when the add in loads,programmatically

    If you want to reset the default MS Word settings as the users' settings, one easiest way is to allow Word to recreate the Normal.dot template. While this will restore some settings to their first-used state (such as macros, toolbars, and the like), it will not do the entire trick. But if you want to automatically restore ms word default normal template when loading the add in, it might be much complex.

    Best Regards,

    Edward


    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.


    Friday, February 27, 2015 9:45 AM
  • Thank you so much Edward , cleared most of my confusions . I think its best to allow word to recreate the Normal.dotm template 
    Friday, February 27, 2015 9:51 AM