How to change name of attachment

D

djohnson

I just created some forms that use the code below to send them as
email. The IP document is also attached to the email and named
"Form1.xml". How would I go about changing the name?

var objEmail;
objEmail = Application.ActiveWindow.MailEnvelope;
objEmail.To = "(e-mail address removed)";
objEmail.CC = ""
objEmail.Subject = "Request Form";
objEmail.Visible = true;


Although this is a beginner level question I'm having trouble finding
the answer. Thank you.
 
S

S.Y.M. Wong-A-Ton

There isn't an "Attachment" property on the MailEnvelope object. It's best to
use an EmailAdapter instead. On an EmailAdapter object, you can change the
name of the IP document by setting its "AttachmentFileName" property.

Download the InfoPath SDK
(http://www.microsoft.com/downloads/...16-93aa-4fe8-9238-d702f1bfbab4&displaylang=en)
if you do not already have it, and search on "EmailAdapter" and
"AttachmentFileName" to get a sample on how to use them.
 

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