By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

How to create an outlook appointment item using Javascript

P: 4
Hi All,

How to create an outlook appointment item using Javascript
with a body containing hyperlink as follows:
<a href="#">My Link</a>.

Please tell me ASAP.
Jul 10 '15 #1
Share this Question
Share on Google+
7 Replies


Dormilich
Expert Mod 5K+
P: 8,639
not at all. JavaScript does not have Outlook bindings.

it may work in IE since you can use ActiveX controls there, but that's JScript, not JavaScript. You’ll find the appropriate documentation on the MSDN website.
Jul 10 '15 #2

P: 4
I am using Active x object. But not able to put a link in a body section. Can you please tell me how could i do this?
Jul 10 '15 #3

Dormilich
Expert Mod 5K+
P: 8,639
Expand|Select|Wrap|Line Numbers
  1. document.body.innerHTML = "your html code here";
Jul 10 '15 #4

P: 4
Can you please elaborate in detail, how to do this?
Jul 10 '15 #5

Dormilich
Expert Mod 5K+
P: 8,639
how to do what?
Jul 10 '15 #6

P: 4
ok, this is my code

Expand|Select|Wrap|Line Numbers
  1.  
  2. function AddCalendarAppointment(appointmentSubject,appointmentBody,travelLocation,departDate,returnDate) {
  3.  
  4.   outlookApp = new ActiveXObject("Outlook.Application");
  5.   nameSpace = outlookApp.getNameSpace("MAPI");
  6.   // Get a handle of the Calendar folder
  7.   apptFolder = nameSpace.getDefaultFolder(9);
  8.  
  9.   // Create a new Appointment item and fill it in
  10.   apptItem = apptFolder.Items.add("IPM.Appointment");
  11.   //alert('hi');
  12.  
  13.   //alert('hi');
  14.   apptItem.Subject = 'Check-In Conversation with <INSERT YOUR NAME HERE>';
  15.     apptItem.Location = '<INSERT LOCATION; AIM FOR LIVE CONVERSATION IF POSSIBLE>';  
  16.    apptItem.Body = 'I’d like to schedule a check-in conversation.';
  17.   apptItem.Save();
  18.  
  19.   //apptItem.ReminderSet = False;
  20.   //apptItem.ReminderMinutesBeforeStart = 15
  21.   //apptItem.BusyStatus = Outlook.OlBusyStatus.olOutOfOffice;
  22.   //apptItem.AllDayEvent = true;
  23.  
  24.   // Show the new contact
  25.   apptItem.Display(); // true = modal
  26. }
  27.  
  28.  
I am able to add plain text but i also want to add a hyperlink like this <a href="#">HI</a> and it should only display Link with text OK in outlook appointment body.
Please suggest me some way
Jul 10 '15 #7

Dormilich
Expert Mod 5K+
P: 8,639
glancing over https://msdn.microsoft.com/en-us/lib...ffice.12).aspx it doesn’t look like you can do what you want.

essentially, your appointment object is a .NET object, not a JavaScript object and you’re actually using IE’s .NET bindings. So the limitation comes from .NET.

however, you could ask at MSDN or in the .NET forums if someone knows how to create links in an appointment object.
Jul 10 '15 #8

Post your reply

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