[mso] Re: Word

  • From: "Glenda Wells" <gwells@xxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Mon, 16 Jun 2003 15:46:03 -0400

Hi Dian.

I had already looked through your stuff but don't see quite what I'm
looking for.  The document isn't a form as much as it is a letter.

The document is in Word.  I've connected to a data source and can merge
the name and address information no problem.

Where I'm stuck now is trying to get the list of forms and their various
values. Some persons will have 2 forms, some 4, some 20. =20

the DB for this piece looks like this and this is what I want in my Word
doc.

Form Name               Value 1         Value 2         Value 3
Log Form                2700                    1325
900
Purchase Form   1100                    902                     1271
CHOP Form               2200                    1500
1700

How do I do the next record thing? =20

/g



-----Original Message-----
From: Dian Chapman [mailto:dian@xxxxxxxxxxxxx]=20
Sent: Monday, June 16, 2003 3:30 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Word


Yes, that's how I would do it and I'd love to help, Glenda. But I'm =3D
guessing you want to do it FROM Access to Word and I've never done it
that way =3D and don't know Access VBA enough to know how to do it that
way.

The way *I* would do it is simple for me...I would create a form in Word
with the VBA code I needed for whatever the "variables" are in the =3D
letter. Then I would connect to the DB via Word and ADO (Access Data
Object)...create a record set from the info I needed and then write some
=3D VBA that would decipher the variable in the fields I needed and run =
a
case statement for whatever the answer would be.=3D20

So say I pull all the records with people who live in the City =3D
"chicago." I could then say, okay from this RecordSet, if the field
"order" says =3D "yes" then pull that record and write the letter THIS
way. If the field =3D "order" says no, write the letter this way. Or =
yes,
I could include other =3D variables that pull the name and other fields
and set up the letter with fields to come out very customized.

I have a sample/demo on my web site for ADO. You can go to
www.mousetrax.com/techpage.html#autoforms and you'll find a series I did
called "Please fill out this form." The series takes a Word form newbie
=3D from start to DB connectivity. Lesson 5 is the DB article and has a =
=3D
downloadable demo that contains a sample form connected to a sample DB
that you can =3D see how you can check the DB via the Word form by
clicking an ActiveX =3D control. Then you can fill out the form from the
DB or fill out the form first =3D and pass the new info back to the DB.
The VBA code is open in the Word form, =3D so you can see how to use ADO
to connect and use SQL to pull a RecordSet =3D and use VBA to fill out =
the
form via form field bookmarks.

And if you want MORE to learn how to use Word forms/VBA better...my Word
AutoForms & VBA course is available at www.mousetrax.com/books.html.

Good luck!


Dian Chapman
Technical Consultant
& Microsoft MVP

Free Word Tips & Tricks eBook: http://www.mousetrax.com/books.html
Free Tutorial site: http://www.mousetrax.com/techpage.html
Free Support Ezine: http://www.mousetrax.com/techtrax/
 =3D20



-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On =3D
Behalf Of Glenda Wells
Sent: Monday, June 16, 2003 9:51 AM
To: mso@xxxxxxxxxxxxx

Hi Word Gurus.
=3D20
I want to create a mail merge letter that pulls some data from an Access
database.  Based on the value of that data, I'd like to change some of =
=3D
the paragraphs.  I suspect Bookmarks and If Then statements are the
answer =3D but not having ever used them, need some guidance. =3D20 Any
suggestions welcome.  /g =3D20 =3D20
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx
=3D or MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to =3D
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the
quotes) in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will =3D
also allow you to change your email settings to digest or vacation (no
mail). //www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, =
=3D
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an =
=3D
invitation with instructions.  Once you are a member of the files group,
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx
or MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to=20
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the
quotes) in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will
also allow you to change your email settings to digest or vacation (no
mail). //www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group,
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an
invitation with instructions.  Once you are a member of the files group,
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: