
Private Sub Document_Open() with Sub AutoOpen() MS Word Merge Custom Field If using earlier versions of Word replace the line: NOTE: the Document_Open subroutine is NOT executed automatically in MS Word 2002 and earlier. If ( = "CheckMe") Then target.Value = True '- check the source text and tick the associated target checkbox if appropriate Set target = ActiveDocument.FormFields("target").CheckBox Set source = ActiveDocument.Bookmarks("source") Be sure that you have created a “Check Box Form Field”, not just a Check Boxįinally open the Tools menu > Macro > Visual Basic Editorĭouble-click on "ThisDocument" on the left-hand pane and then add the following script: Next create the Check Box Form Field, double-click on it and enter the name target in the “Bookmark” field. The field will then be deleted by the macro. When the MS Word Merge document is opened, a macro will use this value in this field to determine whether or not the associated checkbox should be checked. The source field is where the merge data will be stored. Double-click on the field and enter the name source in the “Bookmark” field. On the MS Word Template document create a Text Form Field. Please consult MS Word Help for assistance. If you are using a different version the steps may vary. Note: these instructions are for MS Word 2003.

#Create check box word how to
The following example demonstrates how to check a check box on the MS Word document if the source field within SmartSimple has "CheckMe" as the stored value. Reads the value in the source Text Form Field and changes the value of the Check Box Form Field to True (which will make it checked), if the source value dictates that it should be checked.Create a VB Script that runs automatically when the document opens and does the following:.Create the target Check Box Form Field on the MS Word document.Create a source Text Form Field on the MS Word document to store the value that determines whether or not the Check Box should be checked.You cannot merge information directly into a Check Box Form Field on the MS Word document to make it checked or unchecked. The MS Word Merge Custom Field allows you to merge text stored within SmartSimple into an MS Word document.
