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  

Nested data table in a word 2007 mail merge



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2009, 03:30 PM posted to microsoft.public.word.mailmerge.fields
robgt
external usenet poster
 
Posts: 2
Default Nested data table in a word 2007 mail merge

I'm struggling to find a solution to this problem that I can see will
work on the document layout I have to produce.

Scenario:
I have a word 2007 document to merge into, this document contains some
static text in specific positions and an address.
For each address, there could be zero or more related records to
display in a table. If there are more than 11 related records, records
12 and onwards should be displayed in a table to the right of the
first one, with the same headings and structure as the first one.
There will never be more than related 22 records.

I have a "view" in a SQL Server database which collates all of the
data to populate this merge document.

The address data (including a unique ID for that address) is
replicated for every row of related data.

What I'm struggling to get my head around is how to add the code to
the word document to perform the checks I need before placing data on
the page? On top of that, I don't know how to add the related data
into the table(s).

Each address should have it's own document, and all related records
should be part of that single document (in the relevant table(s) area.

Can anyone offer a solution?
Cheers,
Rob
  #2  
Old July 8th, 2009, 10:22 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Nested data table in a word 2007 mail merge

It is not going to do exactly what you want, but 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
"robgt" wrote in message
...
I'm struggling to find a solution to this problem that I can see will
work on the document layout I have to produce.

Scenario:
I have a word 2007 document to merge into, this document contains some
static text in specific positions and an address.
For each address, there could be zero or more related records to
display in a table. If there are more than 11 related records, records
12 and onwards should be displayed in a table to the right of the
first one, with the same headings and structure as the first one.
There will never be more than related 22 records.

I have a "view" in a SQL Server database which collates all of the
data to populate this merge document.

The address data (including a unique ID for that address) is
replicated for every row of related data.

What I'm struggling to get my head around is how to add the code to
the word document to perform the checks I need before placing data on
the page? On top of that, I don't know how to add the related data
into the table(s).

Each address should have it's own document, and all related records
should be part of that single document (in the relevant table(s) area.

Can anyone offer a solution?
Cheers,
Rob


  #3  
Old July 9th, 2009, 09:53 AM posted to microsoft.public.word.mailmerge.fields
robgt
external usenet poster
 
Posts: 2
Default Nested data table in a word 2007 mail merge

Hi,
Thanks for the reply.
I downloaded that, read through the 22 page tutorial and I thought it
was going to be the solution for me.
Unfortunately there seems to be a sticking point for me, and that is
the table rows being repeated in the document (the nested data
portion, as it were).
I can't have a solution where macro's need to be run unfortunately.

I then tried modifying the code from the MS tutorial he
http://support.microsoft.com/kb/294686 but again, hit a hurdle
(probably lack of knowledge) with the coding side of things.
I thought I'd figured out the structure of the document using that
code, but then the same table row problem cropped up.

How do I apply the ctrl-F9 (field braces) around a table row?
I cannot figure out a way to do that...
If that can be solved, I think I've got it sorted??

I have a bad feeling that it isn't possible though?

Cheers,
Rob



On 8 July, 22:22, "Doug Robbins - Word MVP"
wrote:
It is not going to do exactly what you want, but 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"robgt" wrote in message

...

I'm struggling to find a solution to this problem that I can see will
work on the document layout I have to produce.


Scenario:
I have a word 2007 document to merge into, this document contains some
static text in specific positions and an address.
For each address, there could be zero or more related records to
display in a table. If there are more than 11 related records, records
12 and onwards should be displayed in a table to the right of the
first one, with the same headings and structure as the first one.
There will never be more than related 22 records.


I have a "view" in a SQL Server database which collates all of the
data to populate this merge document.


The address data (including a unique ID for that address) is
replicated for every row of related data.


What I'm struggling to get my head around is how to add the code to
the word document to perform the checks I need before placing data on
the page? On top of that, I don't know how to add the related data
into the table(s).


Each address should have it's own document, and all related records
should be part of that single document (in the relevant table(s) area.


Can anyone offer a solution?
Cheers,
Rob


  #4  
Old July 9th, 2009, 11:28 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Nested data table in a word 2007 mail merge

I am not sure why you would say that you cannot have a solution where a
macro needs to be run.

While I was doubtful that exactly what you wanted could be achieved via mail
merge, I am 99.9% certain that it can be accomplished by a VBA based (i.e.
macro) "roll-your-own" alternative to mail merge.

--
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
"robgt" wrote in message
...
Hi,
Thanks for the reply.
I downloaded that, read through the 22 page tutorial and I thought it
was going to be the solution for me.
Unfortunately there seems to be a sticking point for me, and that is
the table rows being repeated in the document (the nested data
portion, as it were).
I can't have a solution where macro's need to be run unfortunately.

I then tried modifying the code from the MS tutorial he
http://support.microsoft.com/kb/294686 but again, hit a hurdle
(probably lack of knowledge) with the coding side of things.
I thought I'd figured out the structure of the document using that
code, but then the same table row problem cropped up.

How do I apply the ctrl-F9 (field braces) around a table row?
I cannot figure out a way to do that...
If that can be solved, I think I've got it sorted??

I have a bad feeling that it isn't possible though?

Cheers,
Rob



On 8 July, 22:22, "Doug Robbins - Word MVP"
wrote:
It is not going to do exactly what you want, but 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"robgt" wrote in message

...

I'm struggling to find a solution to this problem that I can see will
work on the document layout I have to produce.


Scenario:
I have a word 2007 document to merge into, this document contains some
static text in specific positions and an address.
For each address, there could be zero or more related records to
display in a table. If there are more than 11 related records, records
12 and onwards should be displayed in a table to the right of the
first one, with the same headings and structure as the first one.
There will never be more than related 22 records.


I have a "view" in a SQL Server database which collates all of the
data to populate this merge document.


The address data (including a unique ID for that address) is
replicated for every row of related data.


What I'm struggling to get my head around is how to add the code to
the word document to perform the checks I need before placing data on
the page? On top of that, I don't know how to add the related data
into the table(s).


Each address should have it's own document, and all related records
should be part of that single document (in the relevant table(s) area.


Can anyone offer a solution?
Cheers,
Rob



 




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 01:27 AM.


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