Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Yreka, California, USA
    Posts
    192
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Merge from Excel with Special Requests (Word 2000)

    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!
    Thanks much, Judy Crawford

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Merge from Excel with Special Requests (Word 2000)

    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)

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merge from Excel with Special Requests (Word 2

    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}<!t>[tab]<!/t>{Mergefield Data}" "" }

    where the curly brackets are not typed, they are inserted by pressing Ctrl+F9. Also, the [return] & <!t>[tab]<!/t> 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>post 273185</post#> for some tips on inserting IF fields.
    Hope this helps,

  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Yreka, California, USA
    Posts
    192
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Merge from Excel with Special Requests (Word 2000)

    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.
    Thanks much, Judy Crawford

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Yreka, California, USA
    Posts
    192
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Merge from Excel with Special Requests (Word 2

    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.
    Thanks much, Judy Crawford

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •