Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2022, 11:54 AM
apch90 apch90 is offline Mail Merge into Checkbox Windows 10 Mail Merge into Checkbox Office 2013
Novice
Mail Merge into Checkbox
 
Join Date: Jan 2022
Posts: 3
apch90 is on a distinguished road
Default Mail Merge into Checkbox

I have no idea if this is possible, and I have tried a few solutions I have found through here and other websites. Nothing works so far.

I'm trying to create a form and want to use Mailmerge to help show certain data/documents I have received for something. I have a column in Excel that is a yes/no answer:

IMMUNIZATIONS
Yes


No
Yes
No

So the merge field would be IMMUNIZATIONS, and I want to have the "Yes" shown as a filled checkbox and "No" as an empty checkbox.

So essentially it would be: (CHECKBOX) Immunizations

Thank you
Reply With Quote
  #2  
Old 01-26-2022, 02:14 PM
macropod's Avatar
macropod macropod is offline Mail Merge into Checkbox Windows 10 Mail Merge into Checkbox Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

A mailmerge cannot update a checkbox. You can simulate one, however, using field coding such as:
{SYMBOL {IF{MERGEFIELD IMMUNIZATIONS}= "Y*" 254 168} \a \f Wingdings}

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-26-2022, 02:44 PM
apch90 apch90 is offline Mail Merge into Checkbox Windows 10 Mail Merge into Checkbox Office 2013
Novice
Mail Merge into Checkbox
 
Join Date: Jan 2022
Posts: 3
apch90 is on a distinguished road
Default

I know it cannot. I wanted it to create it. I've tried it using the same way you showed me and I just get ### when I do it.

I created the brackets using Ctrl + F9.
Reply With Quote
  #4  
Old 01-27-2022, 01:06 AM
gmayor's Avatar
gmayor gmayor is offline Mail Merge into Checkbox Windows 10 Mail Merge into Checkbox Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If you were to use E-Mail Merge Add-in or Merge and Split to merge your document to separate documents and the field was inserted in the merge document as

{ MERGEFIELD IMMUNIZATIONS } Immunizations
then you could run a macro on the fly to replace the value with a check box content control, either checked or not according to the value. e.g.
Code:
Sub FixCheck(oDoc)
Dim oChk As Range
Dim oWord As Range
Dim oCtrl As ContentControl
Dim bVal As Boolean

    Set oChk = oDoc.Range
    With oChk.Find
        Do While .Execute(findText:="Immunizations")
            Set oWord = oChk.Previous.Words.Last
            Select Case LCase(Trim(oWord.Text))
                Case "yes": bVal = True
                Case "no": bVal = False
            End Select
            Set oChk = oWord
            Set oCtrl = oChk.ContentControls.Add
            oCtrl.Range.Text = ""
            With oCtrl
                .Type = wdContentControlCheckBox
                .Title = "Immunizations": .Tag = .Title
                .Checked = bVal
                .LockContentControl = True
            End With
            Exit Do
        Loop
    End With
lbl_Exit:
    Set oChk = Nothing
    Set oWord = Nothing
    Set oCtrl = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 01-27-2022, 03:52 AM
macropod's Avatar
macropod macropod is offline Mail Merge into Checkbox Windows 10 Mail Merge into Checkbox Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by apch90 View Post
I've tried it using the same way you showed me and I just get ### when I do it.
Did you actually complete the merge, or are you just previewing it?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 01-27-2022, 07:18 AM
apch90 apch90 is offline Mail Merge into Checkbox Windows 10 Mail Merge into Checkbox Office 2013
Novice
Mail Merge into Checkbox
 
Join Date: Jan 2022
Posts: 3
apch90 is on a distinguished road
Default

I thought I was completing it bc I made it all the way to the complete merge part. But now I have it working. Thank you!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge into Checkbox Mail Merge - Create seperate Mail merge pdf for each sheets of an excel file sureshbvs Word VBA 1 03-12-2021 05:42 AM
Mail Merge into Checkbox Mail Merge with Fields extracted from ROWS instead of COLUMNS or transpose of typical mail merge djrexy Mail Merge 1 05-20-2020 04:04 PM
Mail Merge into Checkbox IF Statements NOT working when the Merge Field is a checkbox shawn.low@cox.net Mail Merge 3 09-25-2019 04:05 PM
simple checkbox in e-mail as a signature angie0923 Word 0 11-03-2016 12:26 PM
Mail merge how to link mail merge field value to a column heading dsummers Mail Merge 1 05-08-2014 02:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft