Convert an InfoPath form into Word Document

R

ridawg

Just read the article by S.Y.M. Wong A Ton on converting an InfoPath form
into a Word document. I have a need to do this for several existing forms.

My question is in the article jscript is the programming language used and I
was wondering if I could use vbscript instead? If so can someone provide an
example?

The reason I'm asking is my existing forms are all using vbscript so I would
like to stick with that versus having to re-create these forms using jscript.

This would be a huge help - Thanks!
 
S

S.Y.M. Wong-A-Ton

Yes, the lines can be translated to VBScript almost one-on-one. Here are some
pointers to help you get started: Remove the semi-colon at the end of each
line, replace "new ActiveXObject(...)" with "CreateObject()", replace "var"
with "Dim", declare and assign variables separately, and use "Set" when
assigning values to objects. This should get you on your way.
 
R

ridawg

Great - thanks for all the help!
--
-ridawg


S.Y.M. Wong-A-Ton said:
Yes, the lines can be translated to VBScript almost one-on-one. Here are some
pointers to help you get started: Remove the semi-colon at the end of each
line, replace "new ActiveXObject(...)" with "CreateObject()", replace "var"
with "Dim", declare and assign variables separately, and use "Set" when
assigning values to objects. This should get you on your way.
 
R

ridawg

Just started working on this - I was side tracked for a little bit.

I've run into a couple of problems and I'm sure you can help me out.

First, when I convert my formatted XML form into XSL using the Transform
Tool I get the following Dialog box - Multiple namspaces were found in the
document (the namespaces are listed and I can select them both or one or the
other)
1.
http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-11-27T14:41:33
2. http://schemas.microsoft.com/office/word/2003/wordml/sp2

I've selected them both and each one separtely but I still can't get this to
work.

The following is the error I get when I actually click the button I've
created.
Object required: '[string: "<?xml version="1.0" "]'
Line 34

Line 33 & 34 are the following:
Dim formInWordML
set formInWordML = formInXML.transformNode(xslXMLToWordML)

I've created a very basic form. Just 3 fields. I'm just trying to get this
to work in VBScript before I try to use it in my more complicated forms.

Thanks for the help!
 
R

ridawg

I figured out how to do this (solved the namspace error and converted S.Y.M.
Wong-A-Ton jscript code to vbscript). Please see the other post I created on
this topic. The other post is called "Convert InfoPath to Word".
--
-ridawg


ridawg said:
Just started working on this - I was side tracked for a little bit.

I've run into a couple of problems and I'm sure you can help me out.

First, when I convert my formatted XML form into XSL using the Transform
Tool I get the following Dialog box - Multiple namspaces were found in the
document (the namespaces are listed and I can select them both or one or the
other)
1.
http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-11-27T14:41:33
2. http://schemas.microsoft.com/office/word/2003/wordml/sp2

I've selected them both and each one separtely but I still can't get this to
work.

The following is the error I get when I actually click the button I've
created.
Object required: '[string: "<?xml version="1.0" "]'
Line 34

Line 33 & 34 are the following:
Dim formInWordML
set formInWordML = formInXML.transformNode(xslXMLToWordML)

I've created a very basic form. Just 3 fields. I'm just trying to get this
to work in VBScript before I try to use it in my more complicated forms.

Thanks for the help!


--
-ridawg


S.Y.M. Wong-A-Ton said:
No worries. :)
 
R

Rania Tallat

Hi
I'm using Office 2003 and i need to convert Info path into MS Word, would you please help me in solving this issue as soon as you can
thank you
 
R

Rania Tallat

Hi
I'm using Office 2003 and i need to convert Info path into MS Word, would you please help me in solving this issue as soon as you can
thank you
 

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