473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Open an Outlook form using Javascript and MAPI object

Hi,

I have an Outlook form which has VB validation script running behind it. I need to launch this form from a webpage. When opening from an <a> anchor, it opens the form OK, but not does not "run" the form therefore the validation script does not run.

I have searched the web and found the following script to run the form. This works OK, but requires the form to be published to an Outlook forms folder, such as public folders. As we have many different exchange servers which are not linked, this means publishing the form on each server.

I want to know if there is a way to "run" not just open the form from a web folder, URL or similar location. e.g. http://intranet/folder/Outlookform.oft

Thanks in advance
Ben


Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript" type="text/JavaScript"> 
  2. <!-- Enable Stealth Mode 
  3.    // Variable Definitions 
  4.    var nameSpace = null; 
  5.    var mailFolder = null; 
  6.    var mailItem = null; 
  7.    var tempDoc = null; 
  8.    var outlookApp = null; 
  9.    function OpenOutlookDoc(whatform) 
  10.    { 
  11.       try 
  12.       { 
  13.       outlookApp = new ActiveXObject("Outlook.Application"); 
  14.       nameSpace = outlookApp.getNameSpace("MAPI"); 
  15.       mailFolder = nameSpace.getDefaultFolder(6); 
  16.       mailItem = mailFolder.Items.add(whatform); 
  17.       mailItem.Display(0)
  18.       } 
  19.       catch(e) 
  20.       { 
  21.       // act on any error that you get 
  22.       } 
  23.       } 
  24.       // Disable Stealth Mode --> 
  25. </script>
  26. <a href=javascript:void(0) onClick="OpenOutlookDoc('c:\documents and settings\hpbparsons\desktop\Approval to Recruit.oft')">Form A</a><br><br>  
  27.  
Mar 21 '07 #1
1 11843
acoder
16,027 Expert Mod 8TB
By "run", do you mean submit the form?
Mar 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Kurt | last post by:
Hi We are developing an off-the-shelf software suite for a certain business sector. Most of the program is simply a GUI on top of some .mdb files. Its a .net application written in c# One...
9
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in...
5
by: Siv | last post by:
Hi, A little while ago I asked if anyone could help me with how to create an email using MS Outlook that contained an embedded picture file. Thanks to Jay Harlow I was able to get this working...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
6
by: Manuel | last post by:
Hi, Using the PIA "Microsoft Outlook 11 Object Library". I've noticed that the Logon method of the NameSpace Object is simply ignored. My Outlook 2003 is full updated. For example if I...
4
by: Brian Hampson | last post by:
I recently upgraded to Outlook 2007 B2TR and have found that I can no longer code against MAPI.DLL It's gone :( Using C#, I used to get the MAPI session, and from that I could change the out of...
1
by: =?Utf-8?B?cm9i?= | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
1
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
0
by: Gnana | last post by:
Following is the piece of code i got from this forum itself but stil i am not able to get the full details of recepients like location,office number. plz help me to access that information.. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.