Proceeding in outlook forms customization's code

M

masani paresh

Hi Friends,

I am new to Outlook customization world. I have designed and publish the
complete form at Tools->Forms->ChooseForm->Calender->ConfRoom by using P.2
tab which have some checkboxes(to select phone, projector, white board etc)
and one list box to display the results and one button "Find Now". My main
purpose is below:

"User will click on the checkboxes as per their requirements followed by
FindNow button. When user click this button it should call a function which
contacts exchange to get the information and display the result in list box."

Could anyone please tell me in which language and how can I write this code
to meet my requirements. Is there any standard way to contact exchange server
for required information.

Thanks in advanced,
Paresh
 
K

Ken Slovak - [MVP - Outlook]

Any form code must be only in VBScript, you don't get a choice. The form
code can use the Outlook object model, CDO 1.21, or a COM wrapper for
Extended MAPI such as Redemption (www.dimastr.com/redemption).

See the forms information at www.outlookcode.com for lots of forms
information and code samples.

I'm not sure what you want to get from Exchange, but normally almost all
code running in a form would use the Outlook object model unless what you
need isn't available from the object model. A lot of that of course would
depend on what version of Outlook you're using.
 
M

masani paresh

Thanks a lot Ken, I have written the VBScript and it is working fine now. I
need one tiny favour. Could you please tell me how can i access "Start Time"
and "End Time" values of Calender->new->Appointment tab and TextBox(All
attendees) of Scheduling tab from my VBSCript. Actually my goal is to read
start time and end time from Appointment tab, list the conference rooms in
list box in customized tab P.2 and when user double click on any conference
room it should appear in All attendees text box in Scheduling tab.

Thanks,
Paresh
 
M

masani paresh

Ken,

One more difficulty I am facing is, I am not able to access the ListBox that
i have kept in my customized form. How to access this listbox to insert the
values like "ListBox1.AddItem conf". Currently it says object required or
ListBox1 is not defined error.

Thanks,
Paresh
 
K

Ken Slovak - [MVP - Outlook]

In the form code for that item you refer to the item as Item. Item.Start is
the start time, Item.End is the end time of the appointment.

Attendees are the Recipients, so you iterate the Item.Recipients collection.
For each Recipient object you check Recipient.Type. Each would have a value
from the OlMeetingRecipientType enum: olOptional, olOrganizer, olRequired or
olResource.
 
K

Ken Slovak - [MVP - Outlook]

How you access any control on the form depends on what the tab name is of
the tab where the control is located. For example, if the tab is named
"TestTab" and the control is "ListBox1" then you'd use
Item.GetInspector.ModifiedFormPages("TestTab").Controls("ListBox1").
 
M

masani paresh

Thanks Ken, Everything is working fine. :)

Could you help on followings last things (hopefully):

1. Actually I want to add recipients like: Item.Recipients.AddItem "Test".
I tried this but the method is not supported.
2. How to send the meeting request programatically? If user click send
button it should send to all the recipients.

Ken, also could you please let me know the documentation/material/book that
I can follow where all these things mentioned? I am refers two different
books "Microsoft OUTLOOK Programming" by Microsof Press and another by Sue
Mosher.

Thanks,
Paresh
 
K

Ken Slovak - [MVP - Outlook]

Recipients has no AddItem method, look in the VBA object browser for what's
available to you. The Add() method of the Recipients collection takes either
an email address ("(e-mail address removed)") or a name that will resolve to an email
address, such as a name in your Contacts or Exchange global address list.

When you add a recipient make sure to use the returned Recipient object from
the Add() function and call the Resolve method on that recipient. Also, make
sure to set the Type property. A To recipient is required, a CC recipient is
optional and a BCC recipient is a resource.

Again the object browser is your friend, use the Send() method to send the
meeting invitation.

The MS Press book is aimed at the professional level, Sue's book is more
geared to macros and forms and covers things for beginners. Sue's book
doesn't cover COM addins, the MS Press book does.
 
M

masani paresh

Ken,

I am sorry but I dont know what is "VBA object browser". Where should I get
this info?

Thanks,
Paresh
 
K

Ken Slovak - [MVP - Outlook]

In Outlook: Alt+F11 to open the Outlook VBA project. In that project F2 to
open the Object Browser. It has a complete list of all Outlook objects,
methods, properties and events and if you press F1 on one of those there's
usually some code snippet to illustrate how to use it.
 
V

Venkat M

Hi,
Thank you, the suggested solutions were very helpful to me as I am new
to vbscripting and outlook forms. I have a question for you...
I want to access the To Recipient field in the outlook form inorder to
change the recipient email everytime whenever a particular box is
checked...I hope you would help me by providing the command vb code for
this?

Thanks in advance,
Venkat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top