none
What is HRESULT 0x800A1704 RRS feed

  • Question

  • C# VSTO Word Sample "wordcontrols"

    private void radioButtonChart_Click(object sender, EventArgs args) {

    ...

    Word.Shape example4Chart = ...

    example4Chart.Activate();
    --> Exception with HRESULT: 0x800A1704

    I cannot find a description of that HRESULT code.

    Thanks in advance !

    • Moved by Kristin Xie Wednesday, January 14, 2015 8:04 AM move to appropriate forum
    Tuesday, January 13, 2015 8:50 PM

Answers

  • Hi Gehard,

    Thanks for sharing with us the workaround.

    >>The word document "wordcontrols.docx" seems to be created with a previous version of Word/VSTO ? and
    not Word 2007/VS2008. So after converting the document the chart looks a bit different.<<

    As far as I know, the Shape.Activate method only extis in Office 2007. You can get more detail about this method from link below:
    Shape.Activate Method Word 2007

    Shape method in Word 2010

    And we can use Shape.select method to active the shape, since it works for Office 2007, 2010 and 2013.

    >>So, may be the HRESULT 0x800A1704 is related to "not the right activation target" ?<<

    I am also not able to find the document for this error message, would you mind providing a sample project to help us to reproduce the issue?

    Also here is artice about chart handling using VBA:
    Creating Charts with VBA in Word 2010

    Hope it is helpful.

    Regards & Fei


    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, January 15, 2015 2:56 AM
    Moderator

All replies

  • Hi ,

    Based on your code, your case related to Word, i will move your case to word for developers forum for better support.

    Best regards,

    Kristin


    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.

    Wednesday, January 14, 2015 8:03 AM
  • Hi,

    I played around a bit...

    The word document "wordcontrols.docx" seems to be created with a previous version of Word/VSTO ? and
    not Word 2007/VS2008. So after converting the document the chart looks a bit different.

    In Word 2007 it seems to me that you cannot activate a Word.Shape.
    You have to call Activate() on the OLEFORMAT.

    example4Chart.OLEFormat.Activate();

    So, may be the HRESULT 0x800A1704 is related to "not the right activation target" ?

    Best regards

    Gerhard

    Wednesday, January 14, 2015 12:47 PM
  • Hi Gehard,

    Thanks for sharing with us the workaround.

    >>The word document "wordcontrols.docx" seems to be created with a previous version of Word/VSTO ? and
    not Word 2007/VS2008. So after converting the document the chart looks a bit different.<<

    As far as I know, the Shape.Activate method only extis in Office 2007. You can get more detail about this method from link below:
    Shape.Activate Method Word 2007

    Shape method in Word 2010

    And we can use Shape.select method to active the shape, since it works for Office 2007, 2010 and 2013.

    >>So, may be the HRESULT 0x800A1704 is related to "not the right activation target" ?<<

    I am also not able to find the document for this error message, would you mind providing a sample project to help us to reproduce the issue?

    Also here is artice about chart handling using VBA:
    Creating Charts with VBA in Word 2010

    Hope it is helpful.

    Regards & Fei


    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, January 15, 2015 2:56 AM
    Moderator