Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
RBergmeyer RBergmeyer is offline
external usenet poster
 
Posts: 2
Default Using SS2005 XML data type column to do a mailmerge

Hello,
Is it possible to do a mail merge using a sql query that just returns a xml
data type column and use the xpaths to populate the merge variables?

Thanks,

Rob Bergmeyer
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Using SS2005 XML data type column to do a mailmerge

Out of the box, Word doesn't really "understand" XML as a "data format",
at least not when you are merging. If I wanted to do this I would
probably either
a. not use merge - e.g. use one of the .NET languages+VSTO if
necessary and probably use content controls and the XML data store to do
the work or
b. (more likely given my current state of knowledge) use VBA, Word's
MailMerge event, and MSXML or some such to extract the stuff I needed
from the XML format column, insert it into Document variables, and use {
DOCVARIABLE } fields to insert those values into the output.

Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

RBergmeyer wrote:
Hello,
Is it possible to do a mail merge using a sql query that just returns a xml
data type column and use the xpaths to populate the merge variables?

Thanks,

Rob Bergmeyer

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
RBergmeyer RBergmeyer is offline
external usenet poster
 
Posts: 2
Default Using SS2005 XML data type column to do a mailmerge

Peter,

I was hoping the the 2007 word object had some magic built into it to allow
handle xml data type with mailmerges. Since this isn't the case, I think I
am going to try using my query to format the XML into a normal looking
dataset that Word can handle. If I run into problems, I may try option B
that you suggested.

Thanks for your help and suggestions!

Rob Bergmeyer



"Peter Jamieson" wrote:

Out of the box, Word doesn't really "understand" XML as a "data format",
at least not when you are merging. If I wanted to do this I would
probably either
a. not use merge - e.g. use one of the .NET languages+VSTO if
necessary and probably use content controls and the XML data store to do
the work or
b. (more likely given my current state of knowledge) use VBA, Word's
MailMerge event, and MSXML or some such to extract the stuff I needed
from the XML format column, insert it into Document variables, and use {
DOCVARIABLE } fields to insert those values into the output.

Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

RBergmeyer wrote:
Hello,
Is it possible to do a mail merge using a sql query that just returns a xml
data type column and use the xpaths to populate the merge variables?

Thanks,

Rob Bergmeyer


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
When I open my data source (xlsx), I cannot see all my data column David Griesel[_2_] Mailmerge 1 February 5th 09 08:56 AM
Data source for mailmerge not selecting all data - PLEASE help! Katie Mailmerge 3 October 28th 08 07:12 AM
How do I type in the right column of a two column spread in Word? I'm Young and I'm Hopeless Page Layout 2 March 8th 08 04:20 PM
Add a Cc column to mailmerge Claudia Mailmerge 2 October 2nd 07 06:18 PM
Cant type in second column Karen Microsoft Word Help 3 September 14th 05 03:48 AM


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