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 / Outlook / Programming Forms / August 2004

Tip: Looking for answers? Try searching our database.

Launching Custom Form from Internet Site

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Blue - 02 Aug 2004 22:19 GMT
Hello all,

I wanted to know if it was possible to launch a custom form from an intranet
or internet web page?  Any help on this is appreciated...Thank you in
advance.

BLUE
Sue Mosher [MVP-Outlook] - 02 Aug 2004 22:44 GMT
Yes, if the site is in the user's Trusted Sites security zone. See
http://www.outlookcode.com/d/code/formonweb.htm for sample code.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hello all,
>
[quoted text clipped - 3 lines]
>
> BLUE
Blue - 02 Aug 2004 22:42 GMT
Sue,

Which part of the sample code tells the webpage where to locate the
customized form?

Sample code:
---------------------------------------------------------
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!-- Enable Stealth Mode
  // Variable Definitions
  var nameSpace = null;
  var mailFolder = null;
  var mailItem = null;
  var tempDoc = null;
  var outlookApp = null;
  function OpenOutlookDoc(whatform)
  {
     try
     {
     outlookApp = new ActiveXObject("Outlook.Application");
     nameSpace = outlookApp.getNameSpace("MAPI");
     mailFolder = nameSpace.getDefaultFolder(6);
     mailItem = mailFolder.Items.add(whatform);
     mailItem.Display(0)
     }
     catch(e)
     {
     // act on any error that you get
     }
     }
     // Disable Stealth Mode -->
</script>
</head>
<body>
<form>
To use form buttons:<br>
<input type=button value="Form A" NAME="OutlookOpen1"
OnClick="OpenOutlookDoc('IPM.Note.FormA')"><br><br>
<input type=button value="Form B" NAME="OutlookOpen2"
OnClick="OpenOutlookDoc('IPM.Note.FormB')"><br><br>
To use text links:<br>
<a href=javascript:void(0) onClick="OpenOutlookDoc('IPM.Note.FormA')">Form
A</a><br><br>
<a href=javascript:void(0) onClick="OpenOutlookDoc('IPM.Note.FormB')">Form
B</a>
<!-- change the information between the single quotes to match your custom
forms class Name like IPM.Note.CustomForm - you can have different links to
different forms, provided you specify a different class Name for each link
//-->
</form>
</body>
</html>
--------------------------------------------------------

> Yes, if the site is in the user's Trusted Sites security zone. See
> http://www.outlookcode.com/d/code/formonweb.htm for sample code.
[quoted text clipped - 7 lines]
> >
> > BLUE
Sue Mosher [MVP-Outlook] - 02 Aug 2004 23:03 GMT
   mailItem = mailFolder.Items.add(whatform);

whatform is the message class of a custom Outlook form -- e.g.
IPM.Note.MyForm -- preferably published to the Organizational Forms library.
See the usage in the OnClick handlers.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Sue,
>
[quoted text clipped - 54 lines]
> > Yes, if the site is in the user's Trusted Sites security zone. See
> > http://www.outlookcode.com/d/code/formonweb.htm for sample code.

> > > Hello all,
> > >
[quoted text clipped - 4 lines]
> > >
> > > BLUE
 
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.