Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
|
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 12th, 2007, 05:01 PM
Registered User
 
Join Date: Mar 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default General Mail Merge Query

Hi everyone, I have a quick 'is it possible' question

At my current job we have order info in a database and each week we run a report which extracts something similar to the following into an excel spreadsheet. It shows what each customer has bought

CustomerID Customer Name Order Cost
ABCD1 Acme £200
DEFG Widget £150
ABCD1 Acme £120

Basically, we then generate letters per line using mail merge but this is wasteful if the same customer has made multiple orders. Is there a simple way to get word to recognise multiple orders and create a line in the document for each item ordered? For example, using the data above, the end result would be 1 letter for Acme with two order items inserted instead of 2 seperate letters with one item each. Can anyone suggest a few basic steps for this or even advise how it might be done better (get it in access and use SQL to join then do something else?).

I really dont want to take up too much of anyones time, just wondering if anyone has done this before using VBA code or if it is going to be a nightmare. I have coded Outlook VBA code before so I should be capable of coding something quite nice but advice on a more elegant solution if available would be great.

Cheers
Iain






Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge in Web aspBegineer83 ASP.NET 2.0 Basics 12 January 4th, 2008 06:00 PM
Mail Merge VBA Query jayp Excel VBA 1 October 14th, 2005 05:25 PM
Need Help In Mail Merge raghur Access VBA 0 September 8th, 2005 05:46 AM
General/e-mail Workshack BOOK: Expert One-on-One Access Application Development 0 June 15th, 2005 03:17 PM
mail merge from query nabrown78 Access VBA 3 April 4th, 2005 08:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.