MergeDocuments2

R

Richard

Hi,

I'm looking for a sample to use MergeDocuments2.

I have tried this:
var templateURL = "http://skipper/InfoPath/Form.xsn";
var saveLocation = "http://skipper/InfoPath";
var defaultValues = '<my:myFields
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-12-15T23:01:39"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">';
defaultValues += '<my:field1>Very nice day !!!</my:field1>';
defaultValues += '<my:field2>PIPPO</my:field2>';
defaultValues += '<my:field3>Pascal</my:field3>';
defaultValues += '<my:field4></my:field4>';
defaultValues += '<my:field5 xsi:nil="true"></my:field5>';
defaultValues += '<my:field6>false</my:field6>';
defaultValues += '</my:myFields>';
var infopath = new ActiveXObject("SharePoint.OpenXMLDocuments.1");
alert(infopath.MergeDocuments2(window, templateURL, defaultValues,
saveLocation));

But it does not open InfoPath form.
everything is working fine.
Using CreateNewDocument2

var infopath = new ActiveXObject("SharePoint.OpenXMLDocuments.1");
var result = infopath.CreateNewDocument2(window, templateURL,
saveLocation);

http://msdn.microsoft.com/library/d...sdk/html/tscliOpenXMLDocuments_SV01036616.asp

Thanks.

Ciao,
Richard.
 

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