How to find count of appointment items copied in Outlook 2007 - outlook

In Outlook 2007 When a user has two calendars say Test and actual calendar and he goes to View All appointment in test calendar, copy say around 20 to 30 appointments and paste them in actual calendar's "All Appointment items view, how to get a message box saying so many items copied.
And to add further to my comment above if the copy/paste is again repeated for another 50 appointment items then message box should show 50 (this count should come correctly without the need to close outlook or terminate the session

If I understand you correctly, you want to track the number of items that have been copied from one calendar to another and display the count of items copied in a dialog box.
I think the way to do this would be to write a wrapper class around the explorer object that wires up the Explorer.BeforeItemCopy and Move etc if you want that as well.
When that event fires you will have to look up the current items selection to get your count.
There may be a better way .. ?
76mel

This is how you do it.
Outlook.Application olApp = new Outlook.Application();
Outlook.Folder cal = olApp.Session.GetDefaultFolder(Outlook.oldefaultfolders.olCalender)();
System.Windows.Forms.MessageBox.Show("Number of items in calendar : {0}", cal.Items.Count.ToString());

Related

Outlook add in (calendar event): Series ID when creating an event with recurrence

I have an Outlook add-in available for Calendar new events, with a task pane
When my task pane is open, in my JS code I can get the item ID:
Office.context.mailbox.item.itemId
And if the event is part of a series, I can get the series ID:
Office.context.mailbox.item.seriesId
My problem is I would like to know the seriesId when i am creating an event with recurrence, but it seems to be null at this moment. Only when the series is saved, and I open an item to edit (a single item from the series), I can get the series ID.
I have seen that when I open (to edit) a single item from the series, both item ID and series ID have (different) value.
But if I open the whole series (to edit) I have no series ID, since the item ID is the series ID...
So I need series ID when creating the event, to save both IDs. Then, when I open an event (to edit), I can check if it is an event of my series or my series itself...
Any help?
I am using Outlook 365 Web
Thanks in advance,
Diego
Ways to get series Id in compose mode are
Using seriesId API, if you are editing an event in the series.
Using saveAsync API, to save the draft series, the callback returns back the item identifier, which is the seriesId.
Thanks for the response. I see that the itemId I get with saveAsync when creating an event with recurrence becomes the series ID.
Then, when I am editing:
A single event of a series, each event has a particular itemID, and all of the items of the series have the same seriesID (the initial itemID when creating the series)
The series, the seriesID is null in that case, since the itemID is the original itemID (which is the seriesID).
An event "and the following events" of a series, seriesID is null and the itemID is the particular one.
How can I know in the 3rd case I am editing the series I created (a part of it)? I don't know how to associate this edition with the initial seriesID I saved. I could think it is a single event edition...
Thanks,
Diego

Applescript populate a dialog list with Microsoft outlook contacts

All,
I'm attempting to create an applescript that allows me to create a word document (a business proposal). One part is being able to use applescript to select the client from micorsoft outlook.
I know how to do this in VBA but in Applescript I can't seem to figure it out. Basically I need a dialog box that either has a list of all my Outlook contacts from which I can select one.
Much appreciated,
-J
Quick and dirty, but this works (Office 2008)
tell application "Microsoft Entourage"
set contactList to {}
set lastContact to (count contacts)
repeat with thisContact from 1 to lastContact
set theContact to item thisContact of contacts
set end of contactList to (first name of theContact & " " & last name of theContact)
end repeat
set contactSelected to (choose from list contactList with prompt "Please select a contact." without multiple selections allowed) as text
if (contactSelected is not "False") then
display dialog contactSelected
end if
end tell
There are essentially two parts to the script: getting the contact names and presenting the information. Getting the contacts is easy because contacts is a property of the application itself. Running this in 40+ contacts only takes a second.
Presenting the data and getting the selection isn't so obvious. The data to be presented has to be a string. Honestly, I forget why I have as text dangling off the end, but I seem to remember that doing this was easier if everything was handled as a string of some kind. Once the selection has been verified—having "False" returned means the user clicked the cancel button—you are then able to carry on with the string where I placed the display dialog. Unfortunately, you don't get the row number or anything convenient like that. It just doesn't work that way, so you will have to do a bit of fudging to get back to the corresponding contact object itself.
Add salt to taste...

wp7 record filtering

For a Windows Phone 7 app, I have several Customer records that I need to display based on when the customers where created, so something like a start date and end date filter (maybe some canned entries listbox that lets you pick - tomorrow, week, month, custom)
Any UI guidance of how to do this so that the interface is kept clean and still leaves enough space for the records to get displayed?
Thanks,
Pratik
You could reserve the majority of the display space for your data and show a brief indication of the current filter in place.
This filter could be an active control of your choice that when tapped takes the user to another page where you provide the criteria selection.
Initially it could show "No filter (tap for criteria)" or some such.

Customizing Outlook and Exchange to add new fields to meetings + querying from Exchange from custom app, is this possible?

Is it possible to customize the window used in Outlook to type in meetings (calendar tab) to add new fields to it ?
That data would be stored in Exchange, then queried by another app that would do something with it.
My problem is to see how I could affect the meeting edit dialog as it is now, to add my new fields.
Any ideas ?
If all you want to do is add some fields to the BOTTOM of the Appointment item inspector, then you can do that very easily with VSTO. It's called a custom outlook form region.
See here: http://msdn.microsoft.com/en-us/library/bb157865.aspx
However, if you want to change elements in the base inspector form itself then that's much more difficult, and involves significantly more work. I don't have a complete answer for that.
You could do this pretty easily with custom forms.
Just derive from the "ipm.appointment" appointment form and add you fields and logic to validate and save those fields as user properties on the meeting item
You can then attach to exchange using RDO or OOM to call back the properties off the meeting items.
you can then publish the form to you whole organisation if you want and over righ the default with soem reg key changes.
or
you can do as above and create yourself an addin using vsto.

Date time stamp Outlook calendar entry automatically?

I use Outlook 2007 calendar to schedule appointments. Is there a way to automatically date time stamp each appointment card as it is created? I want to know what time I created an appointment without having to manually enter it time.
This took forever for me to figure out. While Zoredache has an answer that will work, here's another way. For Outlook 2007:
Open Outlook
Click on "Calendar" in the left side menu
At the top of the screen, Click on "View"
Move pointer to "Current View"
Click on either "All Appointments" or "Active Appointments"
a. Your appointments should now change from Calendar View and be displayed in as a list.
b. Your items will be sorted by either "Subject, Location, Start, End," etc.
Right click on the bar that displays "Subject, Location, Start, End," etc.
Click on "Customize Current View..."
A new window will open. Click on "Fields"
Under "Available fields:" click on "Created"
Then click "Add->"
Then click "Ok"
Clik "OK" again.
And you're finished! Now sort the items as you want, find the item in question, and you'll find the date created under the Created field.
GOOD LUCK!
The already is a property on an Outlook Appointment item named Created that will have the timestamp from when the item is created. I don't have Outlook 2007 in front of me so I cannot tell you how to easily view that property.
In Outlook 2003 if you are looking at the folder view of a calendar and you choose the 'Events' view you can right click on the column headings, select the Field Chooser and then Add the Created column.
You should be able to create a custom Form using the form-designer and add the Created field somewhere on a Form based on the Appointment Item form.
Open the appointment
Click the round button (file) top left corner
Click Properties
Last modified will give you the date and time of entry

Resources