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
- <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>
- <a href=javascript:void(0) onClick="OpenOutlookDoc('c:\documents and settings\hpbparsons\desktop\Approval to Recruit.oft')">Form A</a><br><br>