Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / April 2004

Tip: Looking for answers? Try searching our database.

Creating a customized field or merging with non-address fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard Veysey - 21 Apr 2004 21:29 GMT
I am trying to create a C++ program with many members of
a single class and wanted to simplify the creation of all
the members by creating a template with Microsoft Word
and a Database with all the data and then merging them.  
Just in case, I'll include an example of what I want to
do...

{OBJECT}.SetName("{Name}")
{OBJECT}.SetData1("{Data1}")
Etc., Etc.

These aren't the fields I wish to use, but they'll do for
now.  Anyway, I cannot seem to merge my database with my
word document which means that I have begun to worry that
my big time saver is just a big time waster.  Is there
any way to either create a custom field in Word, or to
use the existing mail merge wizard to merge in my data
from my database into the document.

Thank You
Richard V
Peter Jamieson - 22 Apr 2004 00:06 GMT
It isn't at all clear from your description what you are actually
hoping to use as your data source,  what the field names might be, and how
you are hoping to get the data into the resulting document. So I may have
misunderstood your question completely, but I hope the following makes
sense:

In essence, your data source needs to be a 2-D table (i.e. with columns and
rows, with a field name for each column and, usually, the same number of
columns in each row). That might be implemented in a number of different
ways, e.g.
a. a comma-delimited text file with e.g.

fieldname1, fieldname2, fieldname3
row1field1value, row1field2value,row1field3value
row2field1value, row2field2value,row2field3value
row3field1value, row3field2value,row1field3value
etc.

b. the same thing in a Word document
c. a table in a Word document
d. an Excel worksheet
e. a table or query in an Access database
f. a table or view in any database you can access via ODBC
g. separate data and header fiels are allowed for some types of file
..etc.

What it cannot be is a disconnected recordset or some structure purely of
your own invention.

What you need to get Word mailmerge to merge the data in from that data
source is to use { MERGEFIELD } fields whose names correspond to the columns
in your table, e.g.

{ MERGEFIELD fieldname1 }

You would either have these mergefields in your Word document already, or
use the methods of WOrd's MailMerge object to insert them.

For everything else, you need to have a look at Word's MailMerge object's
methods, properties etc.

Alternatively you can avoid Word's built-in MailMerge altogether and "roll
your own" merge, but then it's up to you how to decide where to put each
field in your data source, etc. etc.

Signature

Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> I am trying to create a C++ program with many members of
> a single class and wanted to simplify the creation of all
[quoted text clipped - 17 lines]
> Thank You
> Richard V
Richard Veysey - 27 Apr 2004 01:25 GMT
It is giving me a message saying that I can't use fomulas
with mail merge, so I'll try taking out the formulas and
see if that fixes anything... It didn't give me that
message before.  Hopefully that will fix my problem, but
if not, I'll tell you anything else that might be
relevent.  Thank you for all your help, and I'm sorry I
didn't give you enough info.  Many people would have
totally disregarded a request that is so vague, so thank
you again for your time and suggestions.
Richard Veysey

>-----Original Message-----
>It isn't at all clear from your description what you are actually
[quoted text clipped - 65 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.