Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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. -- Peter Jamieson http://tips.pjmsn.me.uk "Andrew Kennard" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Peter
Thanks very much for your reply Looks like I'll have to get my thinking cap on ! Cheers Andrew "Peter Jamieson" wrote in message ... 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. -- Peter Jamieson http://tips.pjmsn.me.uk "Andrew Kennard" wrote in message ... 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 |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to link a different Mailmerge header source and data source? | Mailmerge | |||
How can I add data fields to a data source in Word Mail Merge? | Mailmerge | |||
data form button greyed out in word 97 data source | Mailmerge | |||
DotNet Data Table as Mail Merge Data Source | Mailmerge | |||
data in mail merge letter being cut off - data source field size? | Mailmerge |