Change in Word 2013 API with hidden symbols? RRS feed

  • Question

  • I have a Word add-in that performs some moving of data between bookmarks. Some of the data is hidden and can be revealed by the ¶ button in the ribbon. When I perform the data move with the hidden symbols/data shown, it all moves accordingly (like it did in Word 2010). With the symbols/data hidden however, the a lot of the data does not move properly between the bookmarks. Was their some security measure made in the Word 2013 API to cause this? I did not have this issue in Word 2010 and there have been no changes to my code.


    Friday, January 8, 2016 3:40 PM

All replies

  • Please provide more detailed information, including examples of the differences in the two versions and enough code to reproduce the behavior.

    Cindy Meister, Office Developer/Word MVP, <a href=""> my blog</a>

    Friday, January 8, 2016 4:48 PM
  • Hi Cindy,

      The Word/ the addin receives data from the server which get put into bookmarks in the document. There are header, footer, and content bookmarks that get populated from the server. The header and footer contain data info and the content is a richtext box with section breaks above, below, and next to it (see picture).  The user has the option to "refresh" their document, which basically updates the data in the header and footer, but bc all 3 bookmarks are pulled from the server at the same time, if the user has written something in the RTB it will be wiped out. As a work around I have created a hidden bookmark for temporary "cutting and pasting" of the RTB. The code copies and pastes the RTB and the section break next to it in this "temp bookmark", pulls the "refreshed" bookmarks from the server, and then should copy and paste the RTB in the temp bookmark where the new, blank RTB is.

    This works fine when the hidden symbols are shown, but when they are not shown I can see in the debugger 


    The "tempRichTextContentControl" bookmark is hidden because of its temporary usage. In the debugger, when the hidden symbols/text is shown the text is shown correctly as whatever I had entered, but when the hidden symbols/text are hidden, the debugger shows the text as " " (blank space).

    • Edited by Luke415 Monday, January 11, 2016 4:44 PM
    Friday, January 8, 2016 7:46 PM
  • Hi Luke

    I'm afraid your picture didn't make it into the post. FWIW there's no way a section break can be "next to" something. It's either before or after - should I assume after and that there are two section breaks in succession (and if yes, why)?

    I also don't understand the paragraph about the "debugger" - it's just not clear / enough information.

    That's much too much code - I don't want your production code, I want the minimal code to repro the problem you're seeing as well as instructions how to create the situation for testing purposes. And keep in mind no one here has access to your database!

    Cindy Meister, Office Developer/Word MVP, <a href=""> my blog</a>

    Saturday, January 9, 2016 6:02 PM