Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / December 2007

Tip: Looking for answers? Try searching our database.

Word2003 XML as data source ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Kennard - 19 Dec 2007 15:54 GMT
Hi

I'm trying to use an XML file as a data source for mailmerging in Word 2003

However When I try and open it via the datasources button it does not open
it and asks me what is it delimited by !

Ultimately I want to automate this via COM from another application and have
done this so far using CSV files which works fine

When I use the OpenDataSource method I am passing   wdOpenFormatText  to it

As there is a wdOpenFormatXML I assumed I could use an XML file ?

However as I cant seem to get this to work 'manually' as a user ?

What am I missing ?

I need to use XML files to get over quote and comma problems. I also have a
large description field I wish to use. I had considered automating excel and
saving the data in an excel file and linking it to that but it has a 32k
cell limit size which is too small

Thanks

Andrew
Peter Jamieson - 19 Dec 2007 18:27 GMT
Unfortunately you can't use XML format data directly as a data source.
Believe me, I tried to get MS to support it several years ago, for exactly
the reason you quote.

Since the Excel approach isn't going to work, the only things I can suggest
are to
a. transform into an HTML table. The XSLT for that should be fairly
straightforward, but off the top of my head I cannot remember whether Word
imposes the same column count limit (around 63) as it does on its own
tables. Also, I do not know whether Word will accept the kind of text
volumes you mention using that format.
b. transform into a Word document containing a table in WordProcessingML
(i.e. Word 2003 WordProcessingML format). Harder, same limit on column
count, but it is more likely to work. If you are unfamiliar with
WordProcessingML then the first problem is to find out what XML you need to
output. The only way to do that IME is to create a Word table, save it as
XML, and start discarding stuff like font/style info. until you can no
longer open the .xml in Word. (I may have a good starting point for this but
it's a long time ago and would take some digging out. Before doing any of
that, I'd just check that you can use document in WordProcessingML format as
a data source.
c. (maybe) use ADO/ADOX to convert the data into .mdb format

> As there is a wdOpenFormatXML I assumed I could use an XML file ?

This is really for opening WordProcessingML documents I think.

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

> Hi
>
[quoted text clipped - 24 lines]
>
> Andrew
Andrew Kennard - 20 Dec 2007 09:14 GMT
Peter

Thanks very much for your reply

Looks like I'll have to get my thinking cap on !

Cheers

Andrew

> Unfortunately you can't use XML format data directly as a data source.
> Believe me, I tried to get MS to support it several years ago, for exactly
[quoted text clipped - 51 lines]
>>
>> Andrew
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.