are there macros in InfoPath?

M

Matt

HI,
I cannot seem to find any indication that I can create macros in an InfoPath
file. Is this true? Thanks!
Matt
 
C

Charles Maxson

Matt,

InfoPath natively uses scripting languages (VB Script or JScript) for
automation. So while they may not seem like 'macros', you can acheive
roughly of the same effect. Note there is no recorder concept though... Also
note with InfoPath SP 1, you can use VS.NET (VB.NET or C#) to add logic to
IPath solutions...
 
M

Matt

Are they're any good jscript resources on the web? I don't know that stuff
and my scripting needs are very basic. I want to open a particular word
document at the push of a button. Is there a way to do this without code? If
not, where can I find the simplest way to do it? I have this but it only
brings up the printing failure even when I insert the path:

function CTRL95_10::OnClick(eventObj)
{
var wdApp; // a general variable
try {
wdApp = new ActiveXObject("Word.Application");
wdApp.Visible = true;
wdApp.WindowState = 1;
var docObj = null;
docObj = wdApp.Documents.Open(wordDocumentPath);
// wdApp.Quit();
}
catch (e) {
wdApp.Quit();
XDocument.UI.Alert("Printing the Word document failed.");
}

}

Thanks!
Matt
 

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