A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I merge multiple spreadsheet enteries into one word doc?



 
 
Thread Tools Display Modes
  #11  
Old January 26th, 2010, 09:46 PM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default How can I merge multiple spreadsheet enteries into one word do

Hi APP,

Using the first example under the heading "Inserting Text After the Repeated Data", you can repeat the 'Key' field's value after the
repeated text by making, the following mods to the field code:
1. Change the first line by adding '{SET LastKey { Key }' thus:
{QUOTE{IF{ MERGESEQ }= 1 {SET Key ""} {SET LastKey { Key }}}"{IF{ MERGEFIELD State } { Key } "{IF{ MERGESEQ } 1 "
2. Replace the word 'State' in "please contact your State Sales Manager" with a field coded as {REF LastKey}.
That's all you need to do. Adapt as needed for your own requirements.


--
Cheers
macropod
[Microsoft MVP - Word]


"APP" wrote in message ...
Hi everyone and thank you all for your input.
Unfortunately they have not resulted in working solution for me.

I have the tutorial correctly, yet the tutorial does not provide a case
where the key field is in the text to apear after repeating data...

I have tried your solution Doug but I get all sorts of error messages....

Perhaps you see for your self using the tutorial and addind the key field
(state) in the text to appear after the repeating data. You will get the next
value in the data base for the state!!!!

Perhaps there's a merge code to say take value-1?!



thanks

"Doug Robbins - Word MVP" wrote:

Hi Paul,

Yes, the code was written for use with an Excel 97-2003 data source.

While most other data sources could be copied/pasted/exported to that
format, it would not be too difficult to come up with code for use with a
Word datasource. For data in Access. it can certainly be exported to Excel.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"macropod" wrote in message
...
Hi Doug,

If I understand the article correctly, your new method only works with
Excel data sources. Is that correct?

--
Cheers
macropod
[Microsoft MVP - Word]


"Doug Robbins - Word MVP" wrote in message
...
I have developed a new method that may be simpler for you to use.

See the following page of fellow MVP Graham Mayor’s website:
http://www.gmayor.com/ManyToOne.htm


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services
on
a paid professional basis.

"APP" wrote in message
...
Hi Doug,

I have used the very useful tutorial you referenced.
I added text after te repeated data. I have added a the key field as
part of
the text. The problem is that fr that specific field, the value returned
is
the next field in the data base. Where has it is te correct field in th
repeated area.
Here's an example:

Dear X,

Repeating data...with keyfield "productcompany" showing fine.


Text after repeaed data....
On belhaf of "productcompany" .

The problem is when in the repeated data part , the field value returns
item
i of the bdatabase, the same field is showing item 2 of the database in
the
text afer the repeated data.

Thanks for your help.


"Doug Robbins - Word MVP" wrote:

See fellow MVP Macropod's "Word 97-2007 Catalogue/Directory Mailmerge
Tutorial" at:
http://www.wopr.com/index.php?showtopic=731107
or
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
Do read the tutorial before trying to use the mailmerge document
included
with it as you must get the mail merge main document set up exactly as
required.


--
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, originally posted via msnews.microsoft.com

"budman42" wrote in message
...
I have a list of accounts were 5 to 10 accounts are for the same
person / member # (which is also a field) and I created a word doc
that I want to merge with several enteries (the 5 to 10 entries of
the
same person) of the spread sheet..

Anyone have any ideas??

.




.


  #12  
Old January 26th, 2010, 10:00 PM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default How can I merge multiple spreadsheet enteries into one word do

Hi APP,

The third example under the "Inserting Text After the Repeated Data" heading was already coded to output the 'Key' field's value
after the repeated data - it's coding meant the underlying mergefield could be used instead of referring back to the 'Key' field.

--
Cheers
macropod
[Microsoft MVP - Word]


"APP" wrote in message ...
Hi everyone and thank you all for your input.
Unfortunately they have not resulted in working solution for me.

I have the tutorial correctly, yet the tutorial does not provide a case
where the key field is in the text to apear after repeating data...

I have tried your solution Doug but I get all sorts of error messages....

Perhaps you see for your self using the tutorial and addind the key field
(state) in the text to appear after the repeating data. You will get the next
value in the data base for the state!!!!

Perhaps there's a merge code to say take value-1?!



thanks

"Doug Robbins - Word MVP" wrote:

Hi Paul,

Yes, the code was written for use with an Excel 97-2003 data source.

While most other data sources could be copied/pasted/exported to that
format, it would not be too difficult to come up with code for use with a
Word datasource. For data in Access. it can certainly be exported to Excel.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"macropod" wrote in message
...
Hi Doug,

If I understand the article correctly, your new method only works with
Excel data sources. Is that correct?

--
Cheers
macropod
[Microsoft MVP - Word]


"Doug Robbins - Word MVP" wrote in message
...
I have developed a new method that may be simpler for you to use.

See the following page of fellow MVP Graham Mayor’s website:
http://www.gmayor.com/ManyToOne.htm


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services
on
a paid professional basis.

"APP" wrote in message
...
Hi Doug,

I have used the very useful tutorial you referenced.
I added text after te repeated data. I have added a the key field as
part of
the text. The problem is that fr that specific field, the value returned
is
the next field in the data base. Where has it is te correct field in th
repeated area.
Here's an example:

Dear X,

Repeating data...with keyfield "productcompany" showing fine.


Text after repeaed data....
On belhaf of "productcompany" .

The problem is when in the repeated data part , the field value returns
item
i of the bdatabase, the same field is showing item 2 of the database in
the
text afer the repeated data.

Thanks for your help.


"Doug Robbins - Word MVP" wrote:

See fellow MVP Macropod's "Word 97-2007 Catalogue/Directory Mailmerge
Tutorial" at:
http://www.wopr.com/index.php?showtopic=731107
or
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
Do read the tutorial before trying to use the mailmerge document
included
with it as you must get the mail merge main document set up exactly as
required.


--
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, originally posted via msnews.microsoft.com

"budman42" wrote in message
...
I have a list of accounts were 5 to 10 accounts are for the same
person / member # (which is also a field) and I created a word doc
that I want to merge with several enteries (the 5 to 10 entries of
the
same person) of the spread sheet..

Anyone have any ideas??

.




.


  #13  
Old February 1st, 2010, 06:40 PM posted to microsoft.public.word.mailmerge.fields
APP
external usenet poster
 
Posts: 7
Default How can I merge multiple spreadsheet enteries into one word do

Thank you for your help Doug. I was actually using both methods combined.


"Doug Robbins - Word MVP" wrote:

What sorts of error messages? Be specific.

The two methods are not intended to be combined.

--
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, originally posted via msnews.microsoft.com

"APP" wrote in message
...
Hi everyone and thank you all for your input.
Unfortunately they have not resulted in working solution for me.

I have the tutorial correctly, yet the tutorial does not provide a case
where the key field is in the text to apear after repeating data...

I have tried your solution Doug but I get all sorts of error messages....

Perhaps you see for your self using the tutorial and addind the key field
(state) in the text to appear after the repeating data. You will get the
next
value in the data base for the state!!!!

Perhaps there's a merge code to say take value-1?!



thanks

"Doug Robbins - Word MVP" wrote:

Hi Paul,

Yes, the code was written for use with an Excel 97-2003 data source.

While most other data sources could be copied/pasted/exported to that
format, it would not be too difficult to come up with code for use with a
Word datasource. For data in Access. it can certainly be exported to
Excel.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services
on
a paid professional basis.

"macropod" wrote in message
...
Hi Doug,

If I understand the article correctly, your new method only works with
Excel data sources. Is that correct?

--
Cheers
macropod
[Microsoft MVP - Word]


"Doug Robbins - Word MVP" wrote in message
...
I have developed a new method that may be simpler for you to use.

See the following page of fellow MVP Graham Mayor’s website:
http://www.gmayor.com/ManyToOne.htm


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my
services
on
a paid professional basis.

"APP" wrote in message
...
Hi Doug,

I have used the very useful tutorial you referenced.
I added text after te repeated data. I have added a the key field as
part of
the text. The problem is that fr that specific field, the value
returned
is
the next field in the data base. Where has it is te correct field in
th
repeated area.
Here's an example:

Dear X,

Repeating data...with keyfield "productcompany" showing fine.


Text after repeaed data....
On belhaf of "productcompany" .

The problem is when in the repeated data part , the field value
returns
item
i of the bdatabase, the same field is showing item 2 of the database
in
the
text afer the repeated data.

Thanks for your help.


"Doug Robbins - Word MVP" wrote:

See fellow MVP Macropod's "Word 97-2007 Catalogue/Directory
Mailmerge
Tutorial" at:
http://www.wopr.com/index.php?showtopic=731107
or
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
Do read the tutorial before trying to use the mailmerge document
included
with it as you must get the mail merge main document set up exactly
as
required.


--
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, originally posted via msnews.microsoft.com

"budman42" wrote in message
...
I have a list of accounts were 5 to 10 accounts are for the same
person / member # (which is also a field) and I created a word doc
that I want to merge with several enteries (the 5 to 10 entries of
the
same person) of the spread sheet..

Anyone have any ideas??

.




.

.

  #14  
Old February 1st, 2010, 06:49 PM posted to microsoft.public.word.mailmerge.fields
APP
external usenet poster
 
Posts: 7
Default How can I merge multiple spreadsheet enteries into one word do

Thank you macropod. Your solution worked perfectly.
Many thanks to all that have helped me out on this.

all the best.


"macropod" wrote:

Hi APP,

Using the first example under the heading "Inserting Text After the Repeated Data", you can repeat the 'Key' field's value after the
repeated text by making, the following mods to the field code:
1. Change the first line by adding '{SET LastKey { Key }' thus:
{QUOTE{IF{ MERGESEQ }= 1 {SET Key ""} {SET LastKey { Key }}}"{IF{ MERGEFIELD State } { Key } "{IF{ MERGESEQ } 1 "
2. Replace the word 'State' in "please contact your State Sales Manager" with a field coded as {REF LastKey}.
That's all you need to do. Adapt as needed for your own requirements.


--
Cheers
macropod
[Microsoft MVP - Word]


"APP" wrote in message ...
Hi everyone and thank you all for your input.
Unfortunately they have not resulted in working solution for me.

I have the tutorial correctly, yet the tutorial does not provide a case
where the key field is in the text to apear after repeating data...

I have tried your solution Doug but I get all sorts of error messages....

Perhaps you see for your self using the tutorial and addind the key field
(state) in the text to appear after the repeating data. You will get the next
value in the data base for the state!!!!

Perhaps there's a merge code to say take value-1?!



thanks

"Doug Robbins - Word MVP" wrote:

Hi Paul,

Yes, the code was written for use with an Excel 97-2003 data source.

While most other data sources could be copied/pasted/exported to that
format, it would not be too difficult to come up with code for use with a
Word datasource. For data in Access. it can certainly be exported to Excel.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"macropod" wrote in message
...
Hi Doug,

If I understand the article correctly, your new method only works with
Excel data sources. Is that correct?

--
Cheers
macropod
[Microsoft MVP - Word]


"Doug Robbins - Word MVP" wrote in message
...
I have developed a new method that may be simpler for you to use.

See the following page of fellow MVP Graham Mayor’s website:
http://www.gmayor.com/ManyToOne.htm


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services
on
a paid professional basis.

"APP" wrote in message
...
Hi Doug,

I have used the very useful tutorial you referenced.
I added text after te repeated data. I have added a the key field as
part of
the text. The problem is that fr that specific field, the value returned
is
the next field in the data base. Where has it is te correct field in th
repeated area.
Here's an example:

Dear X,

Repeating data...with keyfield "productcompany" showing fine.


Text after repeaed data....
On belhaf of "productcompany" .

The problem is when in the repeated data part , the field value returns
item
i of the bdatabase, the same field is showing item 2 of the database in
the
text afer the repeated data.

Thanks for your help.


"Doug Robbins - Word MVP" wrote:

See fellow MVP Macropod's "Word 97-2007 Catalogue/Directory Mailmerge
Tutorial" at:
http://www.wopr.com/index.php?showtopic=731107
or
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
Do read the tutorial before trying to use the mailmerge document
included
with it as you must get the mail merge main document set up exactly as
required.


--
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, originally posted via msnews.microsoft.com

"budman42" wrote in message
...
I have a list of accounts were 5 to 10 accounts are for the same
person / member # (which is also a field) and I created a word doc
that I want to merge with several enteries (the 5 to 10 entries of
the
same person) of the spread sheet..

Anyone have any ideas??

.




.


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.