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 / October 2006

Tip: Looking for answers? Try searching our database.

Submit E-mail using C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mbussa@accu.com - 25 Oct 2006 16:57 GMT
I'm using IP2k3 SP1 and am writing custom C# submit code.  I have
created a Submit Data Connection that submits via e-mail called "Email
Approved" and would like to call this from within Managed Code.

I have tried the following C# statements:

DAVAdapter submit = (DAVAdapter) thisXDocument.DataAdapters["Email
Approved"];
submit.Submit();

This compiles in VS2k3 but when running the form in IP, I get the
following error:
System.InvalidCastException
Specified cast is not valid.

Can anyone tell me why it can't cast to a DAVAdapter and how I could
get around this or am I even using this correctly?

Thanks, in advance, for your help!
S.Y.M. Wong-A-Ton - 26 Oct 2006 00:47 GMT
Try using the EmailAdapter (see
http://msdn.microsoft.com/library/en-us/ipsdk/html/xdobjEmailAdapterObject_HV011
06499.asp?frame=true
) and NOT the DAVAdapter.
---
S.Y.M. Wong-A-Ton

> I'm using IP2k3 SP1 and am writing custom C# submit code.  I have
> created a Submit Data Connection that submits via e-mail called "Email
[quoted text clipped - 15 lines]
>
> Thanks, in advance, for your help!
 
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.