• Merge from Excel with Special Requests (Word 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Merge from Excel with Special Requests (Word 2000)

    Author
    Topic
    #390500

    I have a user who would like to merge data from an Excel workbook to a Word document. It all works well, but here’s the kicker. She would like to merge only the rows that have figures that are not zero. She has a title for the Row in the Word merge document but would only like it to appear if the amount is a number. For example. Letter One: Hornbrook Fire District {Merge Data) [return] Weed Fire District [ tab] {Merge Data) [return] etc. Letter Two: Scott Valley Fire District {Merge Data) [return] Hornbrook Fire District {Merge Data) [return]. In other words a letter may have three lines or it may have only two; the Excel workbook has many rows to select from for each merge. Got any ideas? Will it require Visual Basic or can it even be done? Thanks in advance!

    Viewing 1 reply thread
    Author
    Replies
    • #693800

      You can set Merge Options in the Mail Merge Wizard dialog; one of the options is to filter the records being merged. I don’t have Word 2000, so I can’t show you the specific dialog (mail merge has been changed significantly in Word 2002)

      • #694080

        Thanks Hans, but I was aware of that possibility. What I really want is for the entire line, even the label for the field not to appear when there’s a zero amount. For example one merged letter might have four lines, another only two, and if all appeared there might be eight or so. I think Phil’s comment about the IF is what I need. Thanks for your help.

    • #693846

      Hi Judy:
      Just to add something to Hans’ suggestion. It’s not clear to me if you want to leave out just the merge data (in which case the wizard will work fine) or leave out the entire line. In the latter case, you will need a nested IF field. Something like:

      { IF “{Mergefield Data} 0” “[return]{Mergefield FirestationName}[tab]{Mergefield Data}” “” }

      where the curly brackets are not typed, they are inserted by pressing Ctrl+F9. Also, the [return] & [tab] are actual returns & tabs. By including the return & tab within your IF field, you eliminate the line when the data = 0, & start a new line when it isn’t. See post 273185 for some tips on inserting IF fields.
      Hope this helps,

      • #694081

        Thanks Phil, you’ve got it. I want to leave out the entire row (not just the merged field) if the amount to be merged is zero. So some letters might have just two rows others more and if all rows were included it might mean eight or so. I will check out your suggested upon my return from an appointment. Thanks for your response.

    Viewing 1 reply thread
    Reply To: Merge from Excel with Special Requests (Word 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: