Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Automation

Status
Not open for further replies.

travisbrown

Technical User
Dec 31, 2001
1,016
I'm trying to launch Outlook from a page using the code below (originally from a post by tsuji, I think)

Code:
<html>
<head>
<title>Your title</title>

<script type="text/javascript">
function OpenOUT() {
  var outlookApp = new ActiveXObject("Outlook.Application");
  var nameSpace = outlookApp.getNameSpace("MAPI");
  mailFolder = nameSpace.getDefaultFolder(6);
  mailItem = mailFolder.Items.add('IPM.Note.FormA');
  mailItem.Subject="This is my subject";
  mailItem.To = "test@test.com";
  mailItem.HTMLBody = "This is the body";
 mailItem.display (0);
 }
</script>
</head>
<body>
<a href="javascript:OpenOUT();">test</a>
</body>
</html>

Error I get is "Automation server can'tcreate the object" on this line: var outlookApp = new ActiveXObject("Outlook.Application");

Can anyone decipher this? Or offer alternatives? It's for a closed environment. All users are OL 2003/IE 6.x/Exchange
 
I guess this would be an unsigned AX, wouldn't it? I think that's the issue; the security setting is locked down in the corporate distribution. IE will run signed AX, I think.

Shame. Is there any other way to get a largish amount of bodytext prepopulated in an email spawned by mailto? The users need to have it run through Outlook - CDO isn't an option here.
 
Silly question: is Outlook installed on client machine? What happens if you include a link ot mailto type?

Cheers,
Dian
 
Yeah. It's a controlled environment: All users are OL 2003/IE 6.x/Exchange
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top