469,361 Members | 2,318 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

newly created meeting request from javascript has no recipient data

Hi all,

I have looked through MSDN on this one and can't seem to find the answer anywhere.

I have created a JavaScript that will launch a meeting request for an address selected from a list. The problem that is occurring is that when the meeting request opens, and I look at the availability grid, any recipient I put in from the code shows "no information" for availability.

The weird thing is that if I delete something like a middle initial and hit enter, the user's data appears because it forced outlook to poll Exchange for the data.

Does anyone know of a way to fix this, perhaps I can force outlook to poll for user data when the window opens?


Thanks

Jeremy
Nov 30 '07 #1
13 4717
pronerd
392 Expert 256MB
Are you sure what you have is JavaScript? It sounds like it might be VB or VBA. In which this is the wrong forum. Either way without being able to see the code I dought that anyone is going to be albe to provide much assistance.
Nov 30 '07 #2
Are you sure what you have is JavaScript? It sounds like it might be VB or VBA. In which this is the wrong forum. Either way without being able to see the code I dought that anyone is going to be albe to provide much assistance.
I wrote it. It is JavaScript.

The code I have works fine. it is getting Outlook to behave as I wish that is the problem. I want to get a JavaScript solution to this rather that coding VBScript for the form because I would like everything to be in one place.
Dec 2 '07 #3
gits
5,390 Expert Mod 4TB
as pronerd said ... you should post the relevant code because without it it would be a guessing game to say something that could help ...

kind regards
Dec 2 '07 #4
as pronerd said ... you should post the relevant code because without it it would be a guessing game to say something that could help ...

kind regards
OK. Here is the code.

Expand|Select|Wrap|Line Numbers
  1. outlookApp = new ActiveXObject("outlook.application"); 
  2. nameSpace = outlookApp.getNameSpace("MAPI");
  3.  
  4. mailFolder = nameSpace.getDefaultFolder(6);
  5.  
  6. mailItem = mailFolder.Items.Add("IPM.Appointment.ConfRmReq");         
  7. mailItem.MeetingStatus = 1;
  8.  
  9. mailItem.Subject = "My Test Appointment";        
  10.  
  11. mailItem.Start = TheDate();
  12.  
  13. var recipient = mailItem.Recipients.Add(confRm);//attendees list
  14. recipient.Resolve;
  15.  
  16. if(recipient.Resolved)
  17. {
  18.    mailItem.Display(); 
  19. }
This code does exactly as I want. except that the availability information shows as "no information" on the grid. If I change the name slightly and force it to resolve the address in the form, the availability becomes available in the grid.
Dec 3 '07 #5
OK. Here is the code.

Expand|Select|Wrap|Line Numbers
  1. outlookApp = new ActiveXObject("outlook.application"); 
  2. nameSpace = outlookApp.getNameSpace("MAPI");
  3.  
  4. mailFolder = nameSpace.getDefaultFolder(6);
  5.  
  6. mailItem = mailFolder.Items.Add("IPM.Appointment.ConfRmReq");         
  7. mailItem.MeetingStatus = 1;
  8.  
  9. mailItem.Subject = "My Test Appointment";        
  10.  
  11. mailItem.Start = TheDate();
  12.  
  13. var recipient = mailItem.Recipients.Add(confRm);//attendees list
  14. recipient.Resolve;
  15.  
  16. if(recipient.Resolved)
  17. {
  18.    mailItem.Display(); 
  19. }
This code does exactly as I want. except that the availability information shows as "no information" on the grid. If I change the name slightly and force it to resolve the address in the form, the availability becomes available in the grid.
I have got the solution. The issue was that I used an alias for the recipient and those do not resolve as simply as an e-mail address. The reason I had an alias was that it had gotten left in my HTML code when I was attempting to solve the problem initialy. Then I discovered the recipient.Resolve() method but never changed what I was sending to my code so it was not resolving properly.

Thanks,

Jeremy
Dec 3 '07 #6
acoder
16,027 Expert Mod 8TB
I have got the solution. The issue was that I used an alias for the recipient and those do not resolve as simply as an e-mail address. The reason I had an alias was that it had gotten left in my HTML code when I was attempting to solve the problem initialy. Then I discovered the recipient.Resolve() method but never changed what I was sending to my code so it was not resolving properly.
Glad you got it working and thanks for posting the solution.

You know if you had a proper JavaScript question rather than IE-only JScript, it'd be so much easier to solve!
Dec 4 '07 #7
Unfortunately, for my project I have to use ActiveX.

I would much rather do this with a proper server side language as it would take a lot less time but at work, I am a man in need of a solution with out the access to the back end to build it so I have to resort to client side work.
Dec 4 '07 #8
acoder
16,027 Expert Mod 8TB
Unfortunately, for my project I have to use ActiveX.

I would much rather do this with a proper server side language as it would take a lot less time but at work, I am a man in need of a solution with out the access to the back end to build it so I have to resort to client side work.
Oh, I accept that and it would make things a lot easier with better documentation.
Dec 5 '07 #9
Hi Guys,

I want a javascript function which shows Public Shared Calendar(opens a window) when I click a link from the webpage. Please help me.

Ex. /Public Folders/All Public Folders/Photography

Thanks in Advance.
Feb 14 '08 #10
acoder
16,027 Expert Mod 8TB
Hi Guys,

I want a javascript function which shows Public Shared Calendar(opens a window) when I click a link from the webpage. Please help me.

Ex. /Public Folders/All Public Folders/Photography

Thanks in Advance.
Is this from the server-side or the client-side? If from the client-side, that's not really possible with JavaScript, though you may use ActiveX for IE. If from the server-side, use a server-side language.
Feb 15 '08 #11
Hi,

I am using your JavaScript code for initiating a new meeting request in Outlook and passing the To, Subject, Start Date, and End Date fields. I was just wondering if you knew how or if it's possible to also automatically populate the Location and Resource (versus the To field) fields?

Thanks,
Eric

My code:
Expand|Select|Wrap|Line Numbers
  1. //Open Meeting Request
  2. function ResMtg(cal,start,end){
  3. //alert(cal+' - '+start+' - '+end);
  4. //Inbox = 6
  5. //Calendar = 9
  6. var mailFolder = ns.getDefaultFolder(9);
  7. var mailItem = mailFolder.Items.Add("IPM.Appointment.ConfRmReq"); 
  8. mailItem.MeetingStatus = 1;
  9. mailItem.Subject = "**Meeting Subject**"; 
  10. mailItem.Start = start;
  11. mailItem.End = end;
  12. var recipient = mailItem.Recipients.Add(cal);//attendees list
  13. recipient.Resolve;
  14. if(recipient.Resolved){mailItem.Display();}
  15. else{alert('Unable to resolve this calendar: '+cal);}
  16. }
  17.  
Mar 18 '08 #12
acoder
16,027 Expert Mod 8TB
I wouldn't be sure, you'd have to check the documentation, but I'd guess mailItem.Location and mailItem.Resource.
Mar 19 '08 #13
I have tested and verified that the following code works for the Location field.

Expand|Select|Wrap|Line Numbers
  1. mailItem.Location = 'my conference room';
  2.  
However, I am still testing the Resource functionality. I will try to search through Microsoft's support web site.

Thanks,
Eric
Mar 25 '08 #14

Post your reply

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

Similar topics

ddtpmyra
2 posts views Thread by ddtpmyra | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.