Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Since Word mailmerge does not have the capability to do anything like a
"previous rec" after doing several nextrec when working with mailmerge, I am trying to do the next best thing (and maybe even better!) First, what I am trying to accomplish, and then you might even see something easier that I can think of.... I have an excel spreadsheet that I use for my notary business. I create a row for each clients transactions (there may be several entries for each signing-this is what is causing the greif) that I witness for loan signing(s) for. This worksheet has all the contact and billing info for everybody for that signing (loan office, title co, escrow company etc) as well as directions, all the dates that are important for the signing, the fee I charge etc... I created 1 document that has two pages that are created from the info in the worksheet when I go to the clients home. One is "Signing Info"and the other is "Invoice". Each of these sheets by themselves work fine. The problem is that if I need to process several rows of info using NEXTREC in the first sheet, then the second sheet will not be able to process the info that was on the row I moved from. This is all understandable, no bugs or anything. What I _THINK_ I really need to do, is to split these into 2 separate docs (created by 2 seperate DOTs) and then use them that way. Now, here is what I am trying to figure out. How can I create both documents, using the same info, as smoothly and automatically as possible? I would ideally like to do this by running one macro. Thanks, Bruce |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Not sure that this will really help but the starting point is that Word does
not really do "one-to many" relationships. If possible, use something that is, such as Access reports. But if you need to use Word, you may find the following articles useful: http://homepage.swissonline.ch/cindy...faq1.htm#DBPic http://support.microsoft.com/default...b;en-us;211303 http://www.knowhow.com/Guides/Compou...poundMerge.htm Peter Jamieson "Bruce" oleexpres.at.johnsonclan.net wrote in message news ![]() Since Word mailmerge does not have the capability to do anything like a "previous rec" after doing several nextrec when working with mailmerge, I am trying to do the next best thing (and maybe even better!) First, what I am trying to accomplish, and then you might even see something easier that I can think of.... I have an excel spreadsheet that I use for my notary business. I create a row for each clients transactions (there may be several entries for each signing-this is what is causing the greif) that I witness for loan signing(s) for. This worksheet has all the contact and billing info for everybody for that signing (loan office, title co, escrow company etc) as well as directions, all the dates that are important for the signing, the fee I charge etc... I created 1 document that has two pages that are created from the info in the worksheet when I go to the clients home. One is "Signing Info"and the other is "Invoice". Each of these sheets by themselves work fine. The problem is that if I need to process several rows of info using NEXTREC in the first sheet, then the second sheet will not be able to process the info that was on the row I moved from. This is all understandable, no bugs or anything. What I _THINK_ I really need to do, is to split these into 2 separate docs (created by 2 seperate DOTs) and then use them that way. Now, here is what I am trying to figure out. How can I create both documents, using the same info, as smoothly and automatically as possible? I would ideally like to do this by running one macro. Thanks, Bruce |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
This is a flat file. This is not a relationship issue. These are just
seperate entries of data when several are selected. ( I could use a relationship, but then I would NOT be able to use word. ) These are not even using a pivot table. Just a selection of multiple rows of data. Thanks Bruce "Peter Jamieson" wrote in message ... Not sure that this will really help but the starting point is that Word does not really do "one-to many" relationships. If possible, use something that is, such as Access reports. But if you need to use Word, you may find the following articles useful: http://homepage.swissonline.ch/cindy...faq1.htm#DBPic http://support.microsoft.com/default...b;en-us;211303 http://www.knowhow.com/Guides/Compou...poundMerge.htm Peter Jamieson "Bruce" oleexpres.at.johnsonclan.net wrote in message news ![]() Since Word mailmerge does not have the capability to do anything like a "previous rec" after doing several nextrec when working with mailmerge, I am trying to do the next best thing (and maybe even better!) First, what I am trying to accomplish, and then you might even see something easier that I can think of.... I have an excel spreadsheet that I use for my notary business. I create a row for each clients transactions (there may be several entries for each signing-this is what is causing the greif) that I witness for loan signing(s) for. This worksheet has all the contact and billing info for everybody for that signing (loan office, title co, escrow company etc) as well as directions, all the dates that are important for the signing, the fee I charge etc... I created 1 document that has two pages that are created from the info in the worksheet when I go to the clients home. One is "Signing Info"and the other is "Invoice". Each of these sheets by themselves work fine. The problem is that if I need to process several rows of info using NEXTREC in the first sheet, then the second sheet will not be able to process the info that was on the row I moved from. This is all understandable, no bugs or anything. What I _THINK_ I really need to do, is to split these into 2 separate docs (created by 2 seperate DOTs) and then use them that way. Now, here is what I am trying to figure out. How can I create both documents, using the same info, as smoothly and automatically as possible? I would ideally like to do this by running one macro. Thanks, Bruce |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
OK, maybe something like
Sub DoubleMerge() ' Untested macro code... Dim objMMMD1 As Word.Document Dim objMMOD1 As Word.Document Dim objMMMD2 As Word.Document Dim objMMOD2 As Word.Document Dim rngMMOD1 As Word.Range ' Open and merge document 1 Set objMMMD1 = Documents.Open(FileName:="mergedoc1.doc") ' Assume the merge data source is already set up With objMMMD1.MailMerge .Destination = wdSendToNewDocument With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute End With ' The Activedocument is now the output document (unless there were errors and a separate error output) Set objMMOD1 = ActiveDocument objMMMD1.Close SaveChanges:=False Set objMMMD1 = Nothing ' Open and merge document 2 Set objMMMD2 = Documents.Open(FileName:="mergedoc2.doc") ' Assume the merge data source is already set up With objMMMD2.MailMerge .Destination = wdSendToNewDocument With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute End With ' The Activedocument is now the output document (unless there were errors and a separate error output) Set objMMOD2 = ActiveDocument objMMOD2.Content.Copy Set rngMMOD1 = objMMOD1.Content rngMMOD1.Collapse Direction:=wdCollapseEnd rngMMOD1.Paste objMMOD1.SaveAs FileName:="myname.doc" objMMOD1.Close SaveChanges:=False objMMOD2.Close SaveChanges:=False Set objMMOD1 = Nothing Set objMMOD2 = Nothing Set rngMMOD1 = Nothing End Sub You may need to add/remove paragraphs around the inserted chunk (cf. http://word.mvps.org/faqs/macrosvba/...InsertFile.htm ). You'll probably be better off putting any headers and footers in one of the documents, and ensuring that your two documents don't use the same paragraph/character style names in tow different ways. Peter Jamieson "Bruce" oleexpres.at.johnsonclan.net wrote in message ... This is a flat file. This is not a relationship issue. These are just seperate entries of data when several are selected. ( I could use a relationship, but then I would NOT be able to use word. ) These are not even using a pivot table. Just a selection of multiple rows of data. Thanks Bruce "Peter Jamieson" wrote in message ... Not sure that this will really help but the starting point is that Word does not really do "one-to many" relationships. If possible, use something that is, such as Access reports. But if you need to use Word, you may find the following articles useful: http://homepage.swissonline.ch/cindy...faq1.htm#DBPic http://support.microsoft.com/default...b;en-us;211303 http://www.knowhow.com/Guides/Compou...poundMerge.htm Peter Jamieson "Bruce" oleexpres.at.johnsonclan.net wrote in message news ![]() Since Word mailmerge does not have the capability to do anything like a "previous rec" after doing several nextrec when working with mailmerge, I am trying to do the next best thing (and maybe even better!) First, what I am trying to accomplish, and then you might even see something easier that I can think of.... I have an excel spreadsheet that I use for my notary business. I create a row for each clients transactions (there may be several entries for each signing-this is what is causing the greif) that I witness for loan signing(s) for. This worksheet has all the contact and billing info for everybody for that signing (loan office, title co, escrow company etc) as well as directions, all the dates that are important for the signing, the fee I charge etc... I created 1 document that has two pages that are created from the info in the worksheet when I go to the clients home. One is "Signing Info"and the other is "Invoice". Each of these sheets by themselves work fine. The problem is that if I need to process several rows of info using NEXTREC in the first sheet, then the second sheet will not be able to process the info that was on the row I moved from. This is all understandable, no bugs or anything. What I _THINK_ I really need to do, is to split these into 2 separate docs (created by 2 seperate DOTs) and then use them that way. Now, here is what I am trying to figure out. How can I create both documents, using the same info, as smoothly and automatically as possible? I would ideally like to do this by running one macro. Thanks, Bruce |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mailmerge - to save to multipule documents | Mailmerge | |||
My Docs & Documents & Settings problems | Microsoft Word Help | |||
How to clean .rtf documents | Microsoft Word Help | |||
Can I set rules in mailmerge documents? | Mailmerge | |||
Mailmerge 2003 Word documents with Access yes/no values | Mailmerge |