Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How does Word use VBA to judge whether the text box content has changed in real time?
How does Word use VBA to judge whether the text box content has changed in real time?
I have never used merge fields, but I will use VBA to manipulate text boxes. The name and content of VBA call text box are as follows:

Call the name code of the text box

Sub? getTextboxName()

For what? Me? =? 1? Where to? This document. Shape, count

What if? This document. Shape (1). Type? =? msoTextBox? then what MsgBox? This document. Shape (1). name

then

End? submarine

The following calls the text box content code.

Sub? getTextboxContent()

For what? Me? =? 1? Where to? This document. Shape, count

What if? This document. Shape (1). Type? =? msoTextBox? then what MsgBox? This document. shapes(I). text frame . text range . text

then

End? If there is a call to the contents of a text box containing subfields, you can use val (thisdocument. Shape (1). Text frame. Textrange.text) function converts numerical judgment into single precision and double precision.