Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Microsoft Word Mail Merge Database | Microsoft Word Help | |||
how to save word doc with mail merge without database to email it | Mailmerge | |||
EXCEL file as a database for Word mail merge in XP. how do I do it | Mailmerge | |||
Mail merge from word to outlook using access database | Mailmerge | |||
Mail Merge - DataPerfect database to Word | Mailmerge |