Linking the ActiveX Control to Field in
Word
The Control Source property is only valid in MS Access. To link the
IDAutomation ActiveX Barcode Control to a text box in a Word document,
follow these instructions.
Solution(s):
This example is based on Word 2000 using the
IDAutomation PDF417 ActiveX
Barcode Control and it assumes a basic knowledge of working with
Macros and VBA in Office Products. For more information on using VBA
and macros in Word, please consult the MS Office documentation.
- Open a new Word Document.
- Click the View Menu Item, click ToolBars and then select Control
Toolbox. This will cause a small, floating toolbox to appear in
the document.
- Select Text Box and place the text box somewhere in the document.
This will be the text box linked to the ActiveX control.
- Click the More Controls button on the Control Toolbox (it looks
similar to a hammer and wrench crossed together). In the list that appears,
click the IDAutomation PDF417 Barcode. This puts a PDF417 barcode
in the document. It may have to be moved around so that it does
not cover the text box that was previously added.
- Select the Textbox by clicking on it. Go to the Control Toolbox
and click the View Code button (it looks similar to a sheet of paper with
a magnifying glass over it). This should open the VBA editor.
- Place the following code in the TextBox_Change Event (it should
already be open): PDF1.DataToEncode = TextBox1.Text
- Close the VBA editor and save everything.
- Design mode should now be the active screen. In the Control
Toolbox, click the Design toggle button. This will permit typing
directly into the textbox. Notice the barcode changes as information
is typed into the textbox.
Related Documents:
|