Group:  General » microsoft.public.office.xml
Thread: How to fill Word XML template with data

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

How to fill Word XML template with data
fpmalard[ at ]gmail.com 27.10.2005 02:32:07
Hello,

I have an application that needs to generate Word documents filled with
data from Database. I start creating a document template inside Word
2003 and then creating a XML Schema from my table. With this XML schema
I then open the native DOC and start adding tags at proper positions.

Now, how can I fill the XML template with the data and then generate a
new Word XML document do be deployed to my users?

Note that my users will have only MSWord 2003 Viewer and I'm planning
to send them only the resulting Word XML document filled with data.

The main idea is to build some kind of report tool but using rich
document interface like MSWord.

Regards,
Fernando.

Re: How to fill Word XML template with data
"Hollis D. Paul" <Hollis[ at ]outhousebythesound.com> 27.10.2005 04:32:47
In article <1130380327.422184.216510[ at ]g47g2000cwa.googlegroups.com>,
wrote:
[Quoted Text]
> Now, how can I fill the XML template with the data and then generate a
> new Word XML document do be deployed to my users?
>
Take a look at the docs for a list of the tools that are available to
use with WordML. Some of the MS help on the toolkit specifically talks
about connecting to databases, and generating inferred schemas that can
be used for the document. I didn't show how to do that in my DishList62
sample, but the MS documents do tell you how to do that.


Using Just Word 2003 (with a little help from Notepad) to develop XML
and XSL documents
http://msmvps.com/obts/articles/56931.aspx


Hollis D. Paul [MVP - Outlook]
Hollis[ at ]outhousebythesound.com
Mukilteo, WA USA


Re: How to fill Word XML template with data
fpmalard[ at ]gmail.com 27.10.2005 16:30:36
Hi Hollis,

Thanks for respond my question.

I just wondering a general outline on how to archieve this. After
reading several MS docs about XML, XSD and XSL I'm little bit confused
on how to start.

What I need is something like:
- Create a plain Word Document with placeholders for the data;
- Save it as XML with placeholders marked;
- Generate a XML with data from my Database;
- Apply the XML data to the XML Word Document filling out the
placeholders with data;
- Save this filled document with extension XML to be opened by a MSWord
2003 Viewer.

I already done parts of this whole process but I didn't figure out how
to connect them.

Any help would be nice.
(I'm using Word 2003, C#(VS2003) and SQL Server 2000)

Regards,
Fernando.

Hollis D. Paul escreveu:

[Quoted Text]
> In article <1130380327.422184.216510[ at ]g47g2000cwa.googlegroups.com>,
> wrote:
> > Now, how can I fill the XML template with the data and then generate a
> > new Word XML document do be deployed to my users?
> >
> Take a look at the docs for a list of the tools that are available to
> use with WordML. Some of the MS help on the toolkit specifically talks
> about connecting to databases, and generating inferred schemas that can
> be used for the document. I didn't show how to do that in my DishList62
> sample, but the MS documents do tell you how to do that.
>
>
> Using Just Word 2003 (with a little help from Notepad) to develop XML
> and XSL documents
> http://msmvps.com/obts/articles/56931.aspx
>
>
> Hollis D. Paul [MVP - Outlook]
> Hollis[ at ]outhousebythesound.com
> Mukilteo, WA USA

Re: How to fill Word XML template with data
"llasserre" <llasserre[ at ]gmail.com> 28.10.2005 08:50:10
'lo
- Create a plain Word Document with placeholders for the data;
Try do that using and XSD file (shema)

- Save it as XML with placeholders marked;
After saving WordML make it be an XSL file using WordML2XSL.exe (look
on MS site)

- Generate a XML with data from my Database;
Using the Shema used below

- Apply the XML data to the XML Word Document filling out the
placeholders with data;
Yes by opening XML Data in word using appling transformation make by
Wordml2xsl

- Save this filled document with extension XML to be opened by a MSWord
2003 Viewer.
That's right .

Good luck

Re: How to fill Word XML template with data
fpmalard[ at ]gmail.com 28.10.2005 10:37:13
Hi and thank you all,

Sorry but I´m not looking for a ready-to-go source code on this
newsgroup. I'm just confused about Microsoft documentation about Word
XML support.

llasserre,

Looks like your steps is the right way to go but I have just one
problem. I can´t use MSWord to apply the data to the XML template.
This transformation will occur on a C# application inside a computer
without MSWord2003 installed. So I guess I will need to use some .NET
framework XML class to do that. Is there any functionality to apply the
transformation via .NET XML namespace?

Regards,
Fernando.

llasserre wrote:
[Quoted Text]
> 'lo
> - Create a plain Word Document with placeholders for the data;
> Try do that using and XSD file (shema)
>
> - Save it as XML with placeholders marked;
> After saving WordML make it be an XSL file using WordML2XSL.exe (look
> on MS site)
>
> - Generate a XML with data from my Database;
> Using the Shema used below
>
> - Apply the XML data to the XML Word Document filling out the
> placeholders with data;
> Yes by opening XML Data in word using appling transformation make by
> Wordml2xsl
>
> - Save this filled document with extension XML to be opened by a MSWord
> 2003 Viewer.
> That's right .
>
> Good luck

Re: How to fill Word XML template with data
David Thielen <david[ at ]windward.net> 31.10.2005 14:31:11
Take a look at www.windwardreports.com - it does this.


On 27 Oct 2005 09:30:36 -0700, fpmalard[ at ]gmail.com wrote:

[Quoted Text]
>Hi Hollis,
>
>Thanks for respond my question.
>
>I just wondering a general outline on how to archieve this. After
>reading several MS docs about XML, XSD and XSL I'm little bit confused
>on how to start.
>
>What I need is something like:
>- Create a plain Word Document with placeholders for the data;
>- Save it as XML with placeholders marked;
>- Generate a XML with data from my Database;
>- Apply the XML data to the XML Word Document filling out the
>placeholders with data;
>- Save this filled document with extension XML to be opened by a MSWord
>2003 Viewer.
>
>I already done parts of this whole process but I didn't figure out how
>to connect them.
>
>Any help would be nice.
>(I'm using Word 2003, C#(VS2003) and SQL Server 2000)
>
>Regards,
>Fernando.
>
>Hollis D. Paul escreveu:
>
>> In article <1130380327.422184.216510[ at ]g47g2000cwa.googlegroups.com>,
>> wrote:
>> > Now, how can I fill the XML template with the data and then generate a
>> > new Word XML document do be deployed to my users?
>> >
>> Take a look at the docs for a list of the tools that are available to
>> use with WordML. Some of the MS help on the toolkit specifically talks
>> about connecting to databases, and generating inferred schemas that can
>> be used for the document. I didn't show how to do that in my DishList62
>> sample, but the MS documents do tell you how to do that.
>>
>>
>> Using Just Word 2003 (with a little help from Notepad) to develop XML
>> and XSL documents
>> http://msmvps.com/obts/articles/56931.aspx
>>
>>
>> Hollis D. Paul [MVP - Outlook]
>> Hollis[ at ]outhousebythesound.com
>> Mukilteo, WA USA


david[ at ]at-at-at[ at ]windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
Page 2 Stage -- http://www.Page2Stage.com
Enemy Nations -- http://www.EnemyNations.com
me -- http://dave.thielen.com
Barbie Science Fair -- http://www.BarbieScienceFair.info
(yes I have lots of links)
Re: How to fill Word XML template with data
"Alexander Bolotnov" <doph[ at ]yandex.ru> 02.12.2005 15:32:38
Faced the same problem. What I do is this:

create an xml in word based on xml schema,
use wml2xslt tool to generate an xslt file for that,
fill the schema xml with data I want,
apply the xslt to your xml,
there you go - the resulting xml file will contain your data with original
formatting of your document.

Alexander.


<fpmalard[ at ]gmail.com> wrote in message
news:1130430636.752247.180790[ at ]o13g2000cwo.googlegroups.com...
[Quoted Text]
> Hi Hollis,
>
> Thanks for respond my question.
>
> I just wondering a general outline on how to archieve this. After
> reading several MS docs about XML, XSD and XSL I'm little bit confused
> on how to start.
>
> What I need is something like:
> - Create a plain Word Document with placeholders for the data;
> - Save it as XML with placeholders marked;
> - Generate a XML with data from my Database;
> - Apply the XML data to the XML Word Document filling out the
> placeholders with data;
> - Save this filled document with extension XML to be opened by a MSWord
> 2003 Viewer.
>
> I already done parts of this whole process but I didn't figure out how
> to connect them.
>
> Any help would be nice.
> (I'm using Word 2003, C#(VS2003) and SQL Server 2000)
>
> Regards,
> Fernando.
>
> Hollis D. Paul escreveu:
>
>> In article <1130380327.422184.216510[ at ]g47g2000cwa.googlegroups.com>,
>> wrote:
>> > Now, how can I fill the XML template with the data and then generate a
>> > new Word XML document do be deployed to my users?
>> >
>> Take a look at the docs for a list of the tools that are available to
>> use with WordML. Some of the MS help on the toolkit specifically talks
>> about connecting to databases, and generating inferred schemas that can
>> be used for the document. I didn't show how to do that in my DishList62
>> sample, but the MS documents do tell you how to do that.
>>
>>
>> Using Just Word 2003 (with a little help from Notepad) to develop XML
>> and XSL documents
>> http://msmvps.com/obts/articles/56931.aspx
>>
>>
>> Hollis D. Paul [MVP - Outlook]
>> Hollis[ at ]outhousebythesound.com
>> Mukilteo, WA USA
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net