Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Montreal, Quebec
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Truncating content for mail merge (Word/Office XP)

    Hi gang,
    When doing a mail merge I want to truncate the content of one cell to show only what I need. What do I need to integrate to the merge field to achieve this result. Let's say I want to keep the first 8 characters in the field.
    Thanks.
    Johanne Champagne
    Montreal (Quebec) CANADA

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

    Re: Truncating content for mail merge (Word/Office XP)

    I don't know hpw to do this with a Word document as data source. I would convert the data source for the mail merge to an Excel worksheet or to a table in an Access database.

    In Excel, you can add a column with formulas like

    =LEFT(A2,8)

    and in Access, you can create a query with a calculated column

    TruncatedField: Left([Field],8)

    Change the data source of your merge document to the Excel sheet or Access query, and use the calculated field.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Montreal, Quebec
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Truncating content for mail merge (Word/Office XP)

    Hi Hans,
    This works just fine in Excel. I get the result I want.
    But
    Nothing appears in my Word document when I merge using data from this column. In only get understokes!?!
    Any other idea?
    Johanne Champagne
    Montreal (Quebec) CANADA

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

    Re: Truncating content for mail merge (Word/Office XP)

    Perhaps you should reconnect to the Excel data source. I know for certain that the method I described works. I've used it in the past, and I just now tested it again.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Montreal, Quebec
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Truncating content for mail merge (Word/Office XP)

    Nope. Tried it again. Just not working.
    When I look at the dialog box where I can select which records to merge, all I see for that column is ____ (underscores).
    In Excel the formatting in this column was set to standard. I changed it to text without results.
    I looks like Word can't see the result.
    I use Office XP in French.
    Could it be because in Excel my function is in French "=GAUCHE(A2;8)" and Word does not recognize it as "=LEFT(A2;8)".
    I just can't figure out why it does not work.
    Johanne Champagne
    Montreal (Quebec) CANADA

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

    Re: Truncating content for mail merge (Word/Office XP)

    Try the following in Word:
    - Select Tools | Options...
    - Activate the General tab.
    - Tick the check box "Confirm conversion at open".
    - Click OK.
    - Go back to step 3 in the Mail Merge task pane.
    - Click the option to select another data source.
    - Navigate to the Excel workbook, select it and click Open.
    - You'll be prompted for a method to connect to the workbook.
    - Select either OLE DB Database Files or MS Excel Worksheets via DDE (*.xls), then click OK.
    - Proceed as usual.

  7. #7
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Montreal, Quebec
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Truncating content for mail merge (Word/Office XP)

    Hi Hans,
    Already tried that. No good either.
    Will try this at home this week-end.
    Will keep you posted.

    Thanks for all your help.
    Johanne Champagne
    Montreal (Quebec) CANADA

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

    Re: Truncating content for mail merge (Word/Office XP)

    I have attached a small Excel workbook. Could you try to use that as data source for a mail merge? It works OK for me if I select OLE DB or DDE, not if I select conversion or ODBC.

  9. #9
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Montreal, Quebec
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Truncating content for mail merge (Word/Office XP)

    Hi Hans,
    Finally figured out what was wrong. We use Powerdocs here and it has a strange way of connecting Word and Excel together. I could not open the data source by selection OLE DB or DDE, only conversion which is not quite working. It works just fine when I'm not connected to Powerdocs.
    Thanks for all your help.
    Johanne Champagne
    Montreal (Quebec) CANADA

Posting Permissions

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