Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / March 2006

Tip: Looking for answers? Try searching our database.

How to change name of attachment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
djohnson - 02 Mar 2006 16:45 GMT
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 = "support@company.com";
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.Y.M. Wong-A-Ton - 03 Mar 2006 09:05 GMT
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/details.aspx?familyid=351f0616-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.
---
S.Y.M. Wong-A-Ton

> 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
[quoted text clipped - 9 lines]
> Although this is a beginner level question I'm having trouble finding
> the answer.  Thank you.
djohnson - 03 Mar 2006 19:54 GMT
Yes... EmailAdapter looks much better and cleaner for what we need.
Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.