Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Kim K Kim K is offline
external usenet poster
 
Posts: 47
Default mail merge with a word database

I have 2 word docs given to me to merge. One is a form letter, the other the
"database". THe form letter needs to have 3 fields. Field one needs to pull
the info from the database of name of business, address, city, state, zip -
FIeld 2 needs ot pull the name and title of the program director, foeld three
needs to have a list of the employees and their title. All this info is on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct info into the
proper places? I ahve only done this with excel but never word, so input is
appreciated.
--
Thanks,,
Kim
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default mail merge with a word database

It is not so much an issue of how you set up the necessary fields as one of
the manipulation that will be required of the data to get it into a format
that it is suitable for use as a mail merge data source.

If there is consistency in the way the data is arranged on each page, it
should be possible to create a macro that will manipulate that data into an
acceptable format, but we would need to know exactly how it is arranged to
be able to make suggestions for the code for such a macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
I have 2 word docs given to me to merge. One is a form letter, the other
the
"database". THe form letter needs to have 3 fields. Field one needs to
pull
the info from the database of name of business, address, city, state,
zip -
FIeld 2 needs ot pull the name and title of the program director, foeld
three
needs to have a list of the employees and their title. All this info is
on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct info into the
proper places? I ahve only done this with excel but never word, so input
is
appreciated.
--
Thanks,,
Kim



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Kim K Kim K is offline
external usenet poster
 
Posts: 47
Default mail merge with a word database

Thank for your help, unfortunately I am not even getting paid for this!

To answer your question, the database form is consistant, it starts with the
name and address of the business, followed by name and title followed by a
bulleted list of employees. This is all on one page per business (all 97 of
them) - what type of macro would I need to do this?
--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

It is not so much an issue of how you set up the necessary fields as one of
the manipulation that will be required of the data to get it into a format
that it is suitable for use as a mail merge data source.

If there is consistency in the way the data is arranged on each page, it
should be possible to create a macro that will manipulate that data into an
acceptable format, but we would need to know exactly how it is arranged to
be able to make suggestions for the code for such a macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
I have 2 word docs given to me to merge. One is a form letter, the other
the
"database". THe form letter needs to have 3 fields. Field one needs to
pull
the info from the database of name of business, address, city, state,
zip -
FIeld 2 needs ot pull the name and title of the program director, foeld
three
needs to have a list of the employees and their title. All this info is
on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct info into the
proper places? I ahve only done this with excel but never word, so input
is
appreciated.
--
Thanks,,
Kim




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default mail merge with a word database

You would need to post into a message exactly how the information is
arranged, using an ¶ (Alt+0182 on the numeric keypad) where each of those
symbols is displayed when you toggle the Show Hide button in Word (that's
the button with the ¶ on it. You would also need to show where any tab
spaces are include in the data - do that by including [tab] wherever one
occurs.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
news
Thank for your help, unfortunately I am not even getting paid for this!

To answer your question, the database form is consistant, it starts with
the
name and address of the business, followed by name and title followed by a
bulleted list of employees. This is all on one page per business (all 97
of
them) - what type of macro would I need to do this?
--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

It is not so much an issue of how you set up the necessary fields as one
of
the manipulation that will be required of the data to get it into a
format
that it is suitable for use as a mail merge data source.

If there is consistency in the way the data is arranged on each page, it
should be possible to create a macro that will manipulate that data into
an
acceptable format, but we would need to know exactly how it is arranged
to
be able to make suggestions for the code for such a macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
I have 2 word docs given to me to merge. One is a form letter, the
other
the
"database". THe form letter needs to have 3 fields. Field one needs
to
pull
the info from the database of name of business, address, city, state,
zip -
FIeld 2 needs ot pull the name and title of the program director, foeld
three
needs to have a list of the employees and their title. All this info
is
on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct info into
the
proper places? I ahve only done this with excel but never word, so
input
is
appreciated.
--
Thanks,,
Kim






  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Kim K Kim K is offline
external usenet poster
 
Posts: 47
Default mail merge with a word database

Lets hope I get this right:

Name of business¶
Address¶
City, ST Zip¶
*Name, Position¶
*Name, Position¶
Name, Director¶

The first three lines will be merged onto the top of the letter
The Name/Positions will be merged into a numbered field in the letter
The Name,Director will be merged into the end of the letter

The indented positions are numerous, some business have 20-25 whiole others
have 3-4, and are set at 1 in margins.

Thank you!



--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

You would need to post into a message exactly how the information is
arranged, using an ¶ (Alt+0182 on the numeric keypad) where each of those
symbols is displayed when you toggle the Show Hide button in Word (that's
the button with the ¶ on it. You would also need to show where any tab
spaces are include in the data - do that by including [tab] wherever one
occurs.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
news
Thank for your help, unfortunately I am not even getting paid for this!

To answer your question, the database form is consistant, it starts with
the
name and address of the business, followed by name and title followed by a
bulleted list of employees. This is all on one page per business (all 97
of
them) - what type of macro would I need to do this?
--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

It is not so much an issue of how you set up the necessary fields as one
of
the manipulation that will be required of the data to get it into a
format
that it is suitable for use as a mail merge data source.

If there is consistency in the way the data is arranged on each page, it
should be possible to create a macro that will manipulate that data into
an
acceptable format, but we would need to know exactly how it is arranged
to
be able to make suggestions for the code for such a macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
I have 2 word docs given to me to merge. One is a form letter, the
other
the
"database". THe form letter needs to have 3 fields. Field one needs
to
pull
the info from the database of name of business, address, city, state,
zip -
FIeld 2 needs ot pull the name and title of the program director, foeld
three
needs to have a list of the employees and their title. All this info
is
on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct info into
the
proper places? I ahve only done this with excel but never word, so
input
is
appreciated.
--
Thanks,,
Kim








  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default mail merge with a word database

IF the layout of each page is as you indicate, if you run a macro containing
the following code when that document is the active document, it will creata
a new document with a table in it that contains the data in a format that
can be used as the data source for your mail merge operation.

Dim Source As Document
Dim Target As Document
Dim TTab As Table
Dim TRow As Row
Dim datarng As Range
Dim i As Long, Pages As Long
Set Source = ActiveDocument
Pages = Source.BuiltInDocumentProperties(wdPropertyPages)
Set Target = Documents.Add
Set TTab = Target.Tables.Add(Target.Range, 1, 5) TTab.Cell(1, 1).Range.Text
= "Company"
TTab.Cell(1, 2).Range.Text = "Address"
TTab.Cell(1, 3).Range.Text = "CityStZip"
TTab.Cell(1, 4).Range.Text = "Employees"
TTab.Cell(1, 5).Range.Text = "Director"
For i = 1 To Pages
Set TRow = TTab.Rows.Add
With Source
TRow.Cells(1).Range.Text = .Paragraphs(1).Range.Text
TRow.Cells(2).Range.Text = .Paragraphs(2).Range.Text
TRow.Cells(3).Range.Text = .Paragraphs(3).Range.Text
.Activate
Selection.HomeKey wdStory
Set datarng = .Bookmarks("\page").Range
End With
With datarng
.Start = .Paragraphs(4).Range.Start
.End = .Paragraphs(.Paragraphs.Count - 1).Range.End
TRow.Cells(4).Range.Text = .Text
.MoveEnd wdParagraph, 1
.Start = .Paragraphs(.Paragraphs.Count).Range.Start
TRow.Cells(5).Range.Text = .Text
End With
Source.Bookmarks("\page").Range.Delete
Next i
Source.Close wdDoNotSaveChanges
Target.Activate

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
Lets hope I get this right:

Name of business¶
Address¶
City, ST Zip¶
*Name, Position¶
*Name, Position¶
Name, Director¶

The first three lines will be merged onto the top of the letter
The Name/Positions will be merged into a numbered field in the letter
The Name,Director will be merged into the end of the letter

The indented positions are numerous, some business have 20-25 whiole
others
have 3-4, and are set at 1 in margins.

Thank you!



--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

You would need to post into a message exactly how the information is
arranged, using an ¶ (Alt+0182 on the numeric keypad) where each of those
symbols is displayed when you toggle the Show Hide button in Word (that's
the button with the ¶ on it. You would also need to show where any tab
spaces are include in the data - do that by including [tab] wherever one
occurs.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
news
Thank for your help, unfortunately I am not even getting paid for this!

To answer your question, the database form is consistant, it starts
with
the
name and address of the business, followed by name and title followed
by a
bulleted list of employees. This is all on one page per business (all
97
of
them) - what type of macro would I need to do this?
--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

It is not so much an issue of how you set up the necessary fields as
one
of
the manipulation that will be required of the data to get it into a
format
that it is suitable for use as a mail merge data source.

If there is consistency in the way the data is arranged on each page,
it
should be possible to create a macro that will manipulate that data
into
an
acceptable format, but we would need to know exactly how it is
arranged
to
be able to make suggestions for the code for such a macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
I have 2 word docs given to me to merge. One is a form letter, the
other
the
"database". THe form letter needs to have 3 fields. Field one
needs
to
pull
the info from the database of name of business, address, city,
state,
zip -
FIeld 2 needs ot pull the name and title of the program director,
foeld
three
needs to have a list of the employees and their title. All this
info
is
on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct info
into
the
proper places? I ahve only done this with excel but never word, so
input
is
appreciated.
--
Thanks,,
Kim








  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Kim K Kim K is offline
external usenet poster
 
Posts: 47
Default mail merge with a word database

"Thank you, I have tried to run this but get a syntax error on this line:

Set TTab = Target.Tables.Add(Target.Range, 1, 5) TTab.Cell(1, 1).Range.Text
= "Company

Any ideas?
--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

IF the layout of each page is as you indicate, if you run a macro containing
the following code when that document is the active document, it will creata
a new document with a table in it that contains the data in a format that
can be used as the data source for your mail merge operation.

Dim Source As Document
Dim Target As Document
Dim TTab As Table
Dim TRow As Row
Dim datarng As Range
Dim i As Long, Pages As Long
Set Source = ActiveDocument
Pages = Source.BuiltInDocumentProperties(wdPropertyPages)
Set Target = Documents.Add
Set TTab = Target.Tables.Add(Target.Range, 1, 5) TTab.Cell(1, 1).Range.Text
= "Company"
TTab.Cell(1, 2).Range.Text = "Address"
TTab.Cell(1, 3).Range.Text = "CityStZip"
TTab.Cell(1, 4).Range.Text = "Employees"
TTab.Cell(1, 5).Range.Text = "Director"
For i = 1 To Pages
Set TRow = TTab.Rows.Add
With Source
TRow.Cells(1).Range.Text = .Paragraphs(1).Range.Text
TRow.Cells(2).Range.Text = .Paragraphs(2).Range.Text
TRow.Cells(3).Range.Text = .Paragraphs(3).Range.Text
.Activate
Selection.HomeKey wdStory
Set datarng = .Bookmarks("\page").Range
End With
With datarng
.Start = .Paragraphs(4).Range.Start
.End = .Paragraphs(.Paragraphs.Count - 1).Range.End
TRow.Cells(4).Range.Text = .Text
.MoveEnd wdParagraph, 1
.Start = .Paragraphs(.Paragraphs.Count).Range.Start
TRow.Cells(5).Range.Text = .Text
End With
Source.Bookmarks("\page").Range.Delete
Next i
Source.Close wdDoNotSaveChanges
Target.Activate

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
Lets hope I get this right:

Name of business¶
Address¶
City, ST Zip¶
*Name, Position¶
*Name, Position¶
Name, Director¶

The first three lines will be merged onto the top of the letter
The Name/Positions will be merged into a numbered field in the letter
The Name,Director will be merged into the end of the letter

The indented positions are numerous, some business have 20-25 whiole
others
have 3-4, and are set at 1 in margins.

Thank you!



--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

You would need to post into a message exactly how the information is
arranged, using an ¶ (Alt+0182 on the numeric keypad) where each of those
symbols is displayed when you toggle the Show Hide button in Word (that's
the button with the ¶ on it. You would also need to show where any tab
spaces are include in the data - do that by including [tab] wherever one
occurs.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
news Thank for your help, unfortunately I am not even getting paid for this!

To answer your question, the database form is consistant, it starts
with
the
name and address of the business, followed by name and title followed
by a
bulleted list of employees. This is all on one page per business (all
97
of
them) - what type of macro would I need to do this?
--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

It is not so much an issue of how you set up the necessary fields as
one
of
the manipulation that will be required of the data to get it into a
format
that it is suitable for use as a mail merge data source.

If there is consistency in the way the data is arranged on each page,
it
should be possible to create a macro that will manipulate that data
into
an
acceptable format, but we would need to know exactly how it is
arranged
to
be able to make suggestions for the code for such a macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
I have 2 word docs given to me to merge. One is a form letter, the
other
the
"database". THe form letter needs to have 3 fields. Field one
needs
to
pull
the info from the database of name of business, address, city,
state,
zip -
FIeld 2 needs ot pull the name and title of the program director,
foeld
three
needs to have a list of the employees and their title. All this
info
is
on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct info
into
the
proper places? I ahve only done this with excel but never word, so
input
is
appreciated.
--
Thanks,,
Kim









  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default mail merge with a word database

That should be two lines and there should be a closing quote

Set TTab = Target.Tables.Add(Target.Range, 1, 5)
TTab.Cell(1, 1).Range.Text = "Company"

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Kim K wrote:
"Thank you, I have tried to run this but get a syntax error on this
line:

Set TTab = Target.Tables.Add(Target.Range, 1, 5) TTab.Cell(1,
1).Range.Text = "Company

Any ideas?

IF the layout of each page is as you indicate, if you run a macro
containing the following code when that document is the active
document, it will creata a new document with a table in it that
contains the data in a format that can be used as the data source
for your mail merge operation.

Dim Source As Document
Dim Target As Document
Dim TTab As Table
Dim TRow As Row
Dim datarng As Range
Dim i As Long, Pages As Long
Set Source = ActiveDocument
Pages = Source.BuiltInDocumentProperties(wdPropertyPages)
Set Target = Documents.Add
Set TTab = Target.Tables.Add(Target.Range, 1, 5) TTab.Cell(1,
1).Range.Text = "Company"
TTab.Cell(1, 2).Range.Text = "Address"
TTab.Cell(1, 3).Range.Text = "CityStZip"
TTab.Cell(1, 4).Range.Text = "Employees"
TTab.Cell(1, 5).Range.Text = "Director"
For i = 1 To Pages
Set TRow = TTab.Rows.Add
With Source
TRow.Cells(1).Range.Text = .Paragraphs(1).Range.Text
TRow.Cells(2).Range.Text = .Paragraphs(2).Range.Text
TRow.Cells(3).Range.Text = .Paragraphs(3).Range.Text
.Activate
Selection.HomeKey wdStory
Set datarng = .Bookmarks("\page").Range
End With
With datarng
.Start = .Paragraphs(4).Range.Start
.End = .Paragraphs(.Paragraphs.Count - 1).Range.End
TRow.Cells(4).Range.Text = .Text
.MoveEnd wdParagraph, 1
.Start = .Paragraphs(.Paragraphs.Count).Range.Start
TRow.Cells(5).Range.Text = .Text
End With
Source.Bookmarks("\page").Range.Delete
Next i
Source.Close wdDoNotSaveChanges
Target.Activate

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
Lets hope I get this right:

Name of business¶
Address¶
City, ST Zip¶
*Name, Position¶
*Name, Position¶
Name, Director¶

The first three lines will be merged onto the top of the letter
The Name/Positions will be merged into a numbered field in the
letter The Name,Director will be merged into the end of the letter

The indented positions are numerous, some business have 20-25 whiole
others
have 3-4, and are set at 1 in margins.

Thank you!



--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

You would need to post into a message exactly how the information
is arranged, using an ¶ (Alt+0182 on the numeric keypad) where
each of those symbols is displayed when you toggle the Show Hide
button in Word (that's the button with the ¶ on it. You would
also need to show where any tab spaces are include in the data -
do that by including [tab] wherever one occurs.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
news Thank for your help, unfortunately I am not even getting paid for
this!

To answer your question, the database form is consistant, it
starts with
the
name and address of the business, followed by name and title
followed by a
bulleted list of employees. This is all on one page per business
(all 97
of
them) - what type of macro would I need to do this?
--
Thanks,,
Kim


"Doug Robbins - Word MVP" wrote:

It is not so much an issue of how you set up the necessary
fields as one
of
the manipulation that will be required of the data to get it
into a format
that it is suitable for use as a mail merge data source.

If there is consistency in the way the data is arranged on each
page, it
should be possible to create a macro that will manipulate that
data into
an
acceptable format, but we would need to know exactly how it is
arranged
to
be able to make suggestions for the code for such a macro.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself
of my services on a paid consulting basis.

Doug Robbins - Word MVP

"Kim K" wrote in message
...
I have 2 word docs given to me to merge. One is a form letter,
the other
the
"database". THe form letter needs to have 3 fields. Field one
needs
to
pull
the info from the database of name of business, address, city,
state,
zip -
FIeld 2 needs ot pull the name and title of the program
director, foeld
three
needs to have a list of the employees and their title. All this
info
is
on
seperate pages in teh word database.

How do I set up the necessary fields to populate the corerct
info into
the
proper places? I ahve only done this with excel but never
word, so input
is
appreciated.
--
Thanks,,
Kim



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Word Mail Merge Database Pruncey Microsoft Word Help 2 October 3rd 06 01:19 PM
how to save word doc with mail merge without database to email it lostlawyer Mailmerge 1 July 14th 06 10:50 PM
EXCEL file as a database for Word mail merge in XP. how do I do it Nana Scherr Mailmerge 2 February 9th 06 07:19 AM
Mail merge from word to outlook using access database xeunox Mailmerge 0 February 1st 06 06:02 PM
Mail Merge - DataPerfect database to Word DustyD Mailmerge 1 January 8th 05 09:49 AM


All times are GMT +1. The time now is 04:19 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"