Re: Tasks and Calendar

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: D (valdezdj_at_fotf.org)
Date: 01/10/05


Date: Mon, 10 Jan 2005 09:59:02 -0800

I'm a bit confused on the AppointmentItem.Start because when I insert this in
it gives me an object must be defined error and I cannot find or place an
object that goes there. I took your advice and I think that c is the best
choice for the user but can we do a function or event that when she inputs a
task it automatically goes to the Calendar? Thanks for your help.
D

"Michael Bauer" wrote:

> Well, if you think, coding that is easier, let´s start :-)
>
> In which manner should the items be selected? You could:
> a) select them by mouse,
> b) get items by searching for keywords like category or subject (or any
> other),
> c) handle all folder items.
>
> Ad a) The selection is available via the
> Application.ActiveExplorer.Selection collection which you can loop
> through.
>
> Ad b) The most properties you can look for with the
> Application.ActiveExplorer.CurrentFolder.Items.Restrict function. The
> function returns an Items collection which you can loop through. Please
> select the Restrict method in the object browser (F2) and press F1 for
> help. The syntax for the filter is explained and also the properties you
> can´t use. In this cases you need to loop through all folder items and
> check item by item for the keywords.
>
> ad c) Loop through the Application.ActiveExplorer.CurrentFolder.Items
> collection and handle all items.
>
> Sample for a loop through a collection:
>
> Dim AnyObj as Object
> Dim AnyCollection As Outlook.Items ' (for b, c) or: As Outlook.Selection
> (for a)
> Dim oTask As Outlook.TaskItem
>
> ' ad a)
> Set AnyCollection = Application.ActiveExplorer.Selection
>
> For Each AnyObj in AnyCollection
> ' check the type of AnyObj
> If TypeOf AnyObj Is Outlook.TaskItem Then
> Set oTask = AnyObj
> ' Handle the TaskItem. Using oTask instead of AnyObj is faster
> and _
> you can benefit from IntelliSense
> Endif
> Next
>
> A new item you can create with Application.CreateItem. If you´ve created
> a new AppointmentItem then you can fill it´s properties with some values
> from your TaskItem, e.g.:
> AppointmentItem.Start = TaskItem.StartDate
>
> After you´ve finished, just call AppointmentItem.Save for storing the
> new data permanently.
>
> Ok, now you´ve got some examples and keywords for your search in the
> object browser (the beginner´s best friend). Please post again if you
> have any more question.
>
> --
> Viele Grüße
> Michael Bauer
>
>
> "D" <valdezdj@fotf.org> wrote in message
> news:89DBB905-1484-409D-8AE2-DE1966DEAD93@microsoft.com...
> > Thank you. But is there a way that they can automatically go the
> correct
> > date, w/ VBA. I gave them the solution but (you know users) she would
> like an
> > easier way, because she has over 300 tasks.
> >
> > "Michael Bauer" wrote:
> >
> > > Just drag the items with the right mouse button to the calendar,
> then
> > > select the proper command from the popup menu.
> > >
> > > --
> > > Viele Grüße
> > > Michael Bauer
> > >
> > >
> > > "D" <valdezdj@fotf.org> wrote in message
> > > news:26368605-9CBC-41C0-B816-0C2668BDE384@microsoft.com...
> > > > This is a good bear with me.
> > > > I have a user that has many tasks created(over 300) and he would
> like
> > > to put
> > > > them in the calendar. The tasks have dates and he would like the
> tasks
> > > to be
> > > > put in the calendar according to their dates. Help me please!
> > > > Thanks,
> > > > --
> > > > D
> > >
> > >
>
>


Quantcast