Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bruce Bruce is offline
external usenet poster
 
Posts: 8
Default Using the same mailmerge criteia for 2 different documents...

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Using the same mailmerge criteia for 2 different documents...

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bruce Bruce is offline
external usenet poster
 
Posts: 8
Default Using the same mailmerge criteia for 2 different documents...

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Using the same mailmerge criteia for 2 different documents...

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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge - to save to multipule documents Miss Marple Mailmerge 1 September 8th 06 07:02 PM
My Docs & Documents & Settings problems Bob Microsoft Word Help 5 December 17th 05 05:20 PM
How to clean .rtf documents MLeditor_Dana Microsoft Word Help 1 November 9th 05 05:39 PM
Can I set rules in mailmerge documents? Emma1405 Mailmerge 1 October 23rd 05 12:31 AM
Mailmerge 2003 Word documents with Access yes/no values BrendaV Mailmerge 1 October 14th 05 04:21 PM


All times are GMT +1. The time now is 01:17 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"