ferrofabulous.blogg.se

How to create text box in word
How to create text box in word














#How to create text box in word code

Now you can write the code that will run when the button is clicked. On the View menu, select Properties Window.įind TextBox1 in the Properties window drop-down box and change the Name property of the text box to displayText.ĭrag a Button control to the document and change the following properties. You can modify the way controls and shape objects are inserted by changing the default on the Edit tab of the Options dialog box in Word. In Word, controls are dropped in-line with text by default. Verify that the document is open in the Visual Studio designer.įrom the Common Controls tab of the Toolbox, drag a TextBox control to the document. The user interface controls consist of a button and a text box on the Word document. Visual Studio opens the new Word document in the designer and adds the My Word Button project to Solution Explorer. In the wizard, select Create a new document.įor more information, see How to: Create Office projects in Visual Studio. To create a new projectĬreate a Word Document project with the name My Word Button. The first step is to create a Word Document project. For more information, see Configure a computer to develop Office solutions.

how to create text box in word

You need the following components to complete this walkthrough:Īn edition of Visual Studio that includes the Microsoft Office developer tools. For more information, see Personalize the IDE. The Visual Studio edition that you have and the settings that you use determine these elements.

how to create text box in word

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions.














How to create text box in word