none
Regression bug in Word 2013 concerning Document.ContentControlOnExit RRS feed

  • Question

  • Hi,

    If you create a Content Control inside of a TextBox and then click somewhere outside both the Content Control and the TextBox the ContentControlOnExit event will not be fired.

    Clicking inside of the TextBox (but outside of the Content Control) as well as using the arrow keys to navigate outside of the Content Control fires the event correctly.

    This behaviour is not observable in Word 2010.

    Best regards,

    Tuesday, May 27, 2014 4:05 PM

All replies

  • Hi,

    How do you develop with ContentControlOnExit event? VBA macro or VSTO C#/VB.Net?

    I try to reproduce your issue in my Word 2013 and 2010. I'm not sure how you "create a Content Control inside of a TextBox". After testing, I think the VBA code below works well to pop up the text of content control when I click outside a Rich Text Content Control or inside of the ActiveX Text Box. I put the code in ThisDocument file as followed.

    Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
        MsgBox ContentControl.Range.Text
    End Sub

    I suggest you referring to my code to edit your code to see whether the issue is resolved. In addition, you could try it in other machines which have Word 2013 installed to test this issue. If these all cannot help, I suggest you sharing your sample Word document and code by OneDrive to help us troubleshoot. 


    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, May 28, 2014 10:05 AM
    Moderator
  • Hi,

    I am using VSTO in C# but I was able to reproduce using the same VBA macro as you provided above.

    Here's a docm that contains a reproducible document and the macro above:

    https://onedrive.live.com/redir?resid=F9662C84D9F9AC83!871&authkey=!ALFhjui3gsOVri8&ithint=file%2c.docm

    I have also tried on a different PC and when disabling all addons and in safe mode.

    Wednesday, May 28, 2014 4:22 PM
  • Hi,

    Thank you for providing more details to help us understand.

    I find the Text Box in your document is a Text Box shape rather than a Text Box control and I think I could reproduce your issue. So I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Sorry for any inconvenience and have a nice day!


    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, May 29, 2014 9:19 AM
    Moderator
  • Hello k0y0te,

    Thanks for reporting this!

    I am able to reproduce the issue locally. I will report the issue internally to validate further.

    Saturday, June 21, 2014 12:41 AM
  • Thanks Pradeep!

    Is there any way to follow if/when this will be fixed in a future update?

    Friday, July 11, 2014 8:32 AM