Execute XSL transform programatically

A

AlexT.

Folks

Is there a way to apply an XSL transformation melodramatically "after
the fact"... ?!

I have an XML file and an XSL transform. I can do

Documents.Open FileName:= "myfile.xml", XMLTransform:=
"mytransform.xsl" and it works (amazingly) well. However I don't see
any way to define the word *template* to use.

So I thought about creating a new document from the relevant template
(trivial) and then do a Selection.InsertFile, That works (the XML file
is recognized as such)... But then how do I perform a transform ?!

Any idea / pointer most welcome !

Regards

--alexT
 
P

Peter Jamieson

If you just need to associate the newly created Word document with a
specific template, insert the relevant WordProcessingML code that
specifies the template using your xslt.

Is there some particular thing you would expect to happen if you could
associate the template "during" the transformation (e.g. injection of
content from the template?)

Peter Jamieson

http://tips.pjmsn.me.uk
 
A

AlexT.

If you just need to associate the newly created Word document with a
specific template, insert the relevant WordProcessingML code that
specifies the template using your xslt.

Is there some particular thing you would expect to happen if you could
associate the template "during" the transformation (e.g. injection of
content from the template?)

Peter Jamieson

http://tips.pjmsn.me.uk


Thanks for your answer.

Yes there is a whole bunch of design / content in the template. I
wasn't fully aware that a template could be specified in the
WordProcessingML - that might be my solution...

Regards

-alexT
 
P

Peter Jamieson

I think specifying the template name via xslt is probably going to be
rather like attaching a template after you have opened a .docx, which
doesn't actually do much.

Peter Jamieson

http://tips.pjmsn.me.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top