Send e-mail with jscript

S

Scott

I am using:

{var oEnvelope = application.activewindow.mailenvelope;
oEnvelope.visible = true;}

to send my form via e-mail. The problem is, it is being sent as an
attatchment and in the body of the e-mail. Is there a way to only send the
form as an attatchment and keep the body of the e-mail empty? Thanks.
 
S

Scott

Is this a jscript code or vb script? is there a way to use jscript and
vbscript on the same form?
 
U

Uma Karnati

The given code (Which is in the given link) will work in the VBScript and
Jscript. But, there is no way to use Jscript and Vbscript on the single
InfoPath form.
 
S

S.Y.M. Wong-A-Ton

It's jscript code. And no, you can use either jscript or vbscript in one form.
 
S

Sandeep

Hi Scott

To use this code, you will first have to add E-mail as a Submitting Data
Source.

1) In Design mode, choose Data Connections from the Tools Menu and then
click Add.
2) Select Submit Data, and then click Next.
3) Select as an e-mail message, and then click Next.
4) Delete all text in all textboxes on the window (you will be adding all of
this content back in later using code). Click Next.
5) On the next window enter a name into the textbox. Remember what you name
it. Click Finish.

U can write code as :

CTRL136_7::OnClick(eventObj)
- XDocument::OnLoad(eventObj)
- CTRL211_7::OnClick(eventObj)
- XDocument::OnSaveRequest(eventObj)
- XDocument::OnSign(eventObj)

Write this code in above functions any one.

var objEmailAdapter;
objEmailAdapter = XDocument.DataAdapters("THE NAME YOU TYPED IN STEP FIVE");
objEmailAdapter.To = "(e-mail address removed)";
objEmailAdapter.Subject = "Status Report";
objEmailAdapter.Submit();
 

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