PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Adding Appointment to a user's calendar

Reply

Adding Appointment to a user's calendar

 
Thread Tools Rate Thread
Old 05-08-2004, 07:03 PM   #1
=?Utf-8?B?RGF2aWQgTGluZHNleQ==?=
Guest
 
Posts: n/a
Default Adding Appointment to a user's calendar


I want to write a VB.Net program that adds appointments and or tasks to a
user's calendar or task list. I see through different examples how to do
this but, it sends this appointment/task as an email request. Once this
email is delivered, the user has to accept or decline it. Say for example, I
want to programatically add an appointment to John Doe's calendar. Is there
a way to do that with out John's interaction so that when he opens Outlook,
it is there?

Thanks,
David Lindsey
  Reply With Quote
Old 05-08-2004, 08:00 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Adding Appointment to a user's calendar

If you are working in an Exchange organization and have Write access to the
other person's calendar folder, you can use the
Namespace.GetSharedDefaultFolder method to return the MAPIFolder object,
then create a new item in it by using the Add method on its Items
collection. See http://www.outlookcode.com/codedetail.aspx?id=405 for a code
sample.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in message
news:E12BEBD0-0B17-46CA-85FA-1DE1C24DA54A@microsoft.com...
> I want to write a VB.Net program that adds appointments and or tasks to a
> user's calendar or task list. I see through different examples how to do
> this but, it sends this appointment/task as an email request. Once this
> email is delivered, the user has to accept or decline it. Say for

example, I
> want to programatically add an appointment to John Doe's calendar. Is

there
> a way to do that with out John's interaction so that when he opens

Outlook,
> it is there?
>
> Thanks,
> David Lindsey



  Reply With Quote
Old 06-08-2004, 05:50 PM   #3
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Adding Appointment to a user's calendar

Outlook 2003. Did you download the PIAs for Outlook 2002?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in message
news:58A87B22-7DF9-4C96-ABD1-088BFB13BDC7@microsoft.com...
> What version of Outlook is this using. In testing this code, I get the
> following error.
> -278658801 at the objNS.GetSharedDefaultFolder(objRecip,
> Outlook.OlDefaultFolders.olFolderCalendar) line of code. I noticed in

your
> example, the Imports Outlook = Microsoft.Office.Interop.Outlook at the
> beginning. When I try that I don't have the choice for .Interop.Outlook.

I
> only have the .Core option. Is this the reason it is erring out? And,

I'm
> running Outlook 2002. Is this also a problem?
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
> > If you are working in an Exchange organization and have Write access to

the
> > other person's calendar folder, you can use the
> > Namespace.GetSharedDefaultFolder method to return the MAPIFolder object,
> > then create a new item in it by using the Add method on its Items
> > collection. See http://www.outlookcode.com/codedetail.aspx?id=405 for a

code
> > sample.


> >
> > "David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in

message
> > news:E12BEBD0-0B17-46CA-85FA-1DE1C24DA54A@microsoft.com...
> > > I want to write a VB.Net program that adds appointments and or tasks

to a
> > > user's calendar or task list. I see through different examples how to

do
> > > this but, it sends this appointment/task as an email request. Once

this
> > > email is delivered, the user has to accept or decline it. Say for

> > example, I
> > > want to programatically add an appointment to John Doe's calendar.

Is
> > there
> > > a way to do that with out John's interaction so that when he opens

> > Outlook,
> > > it is there?
> > >
> > > Thanks,
> > > David Lindsey

> >
> >
> >



  Reply With Quote
Old 06-08-2004, 07:05 PM   #4
=?Utf-8?B?RGF2aWQgTGluZHNleQ==?=
Guest
 
Posts: n/a
Default Re: Adding Appointment to a user's calendar

No I didn't. Is that the missing link here? I guess I can go to the
downloads and get that?

"Sue Mosher [MVP-Outlook]" wrote:

> Outlook 2003. Did you download the PIAs for Outlook 2002?
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in message
> news:58A87B22-7DF9-4C96-ABD1-088BFB13BDC7@microsoft.com...
> > What version of Outlook is this using. In testing this code, I get the
> > following error.
> > -278658801 at the objNS.GetSharedDefaultFolder(objRecip,
> > Outlook.OlDefaultFolders.olFolderCalendar) line of code. I noticed in

> your
> > example, the Imports Outlook = Microsoft.Office.Interop.Outlook at the
> > beginning. When I try that I don't have the choice for .Interop.Outlook.

> I
> > only have the .Core option. Is this the reason it is erring out? And,

> I'm
> > running Outlook 2002. Is this also a problem?
> >
> > "Sue Mosher [MVP-Outlook]" wrote:
> >
> > > If you are working in an Exchange organization and have Write access to

> the
> > > other person's calendar folder, you can use the
> > > Namespace.GetSharedDefaultFolder method to return the MAPIFolder object,
> > > then create a new item in it by using the Add method on its Items
> > > collection. See http://www.outlookcode.com/codedetail.aspx?id=405 for a

> code
> > > sample.

>
> > >
> > > "David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in

> message
> > > news:E12BEBD0-0B17-46CA-85FA-1DE1C24DA54A@microsoft.com...
> > > > I want to write a VB.Net program that adds appointments and or tasks

> to a
> > > > user's calendar or task list. I see through different examples how to

> do
> > > > this but, it sends this appointment/task as an email request. Once

> this
> > > > email is delivered, the user has to accept or decline it. Say for
> > > example, I
> > > > want to programatically add an appointment to John Doe's calendar.

> Is
> > > there
> > > > a way to do that with out John's interaction so that when he opens
> > > Outlook,
> > > > it is there?
> > > >
> > > > Thanks,
> > > > David Lindsey
> > >
> > >
> > >

>
>
>

  Reply With Quote
Old 06-08-2004, 07:39 PM   #5
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Adding Appointment to a user's calendar

You certainly should be using the MS PIAs, not the ones that VB.NET builds
from the Outlook files. I think I have a link at
http://www.outlookcode.com/d/index.htm#dotnet

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in message
news:B38D6FBC-BB02-4DFD-8145-A848B9411776@microsoft.com...
> No I didn't. Is that the missing link here? I guess I can go to the
> downloads and get that?
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
> > Outlook 2003. Did you download the PIAs for Outlook 2002?


> >
> > "David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in

message
> > news:58A87B22-7DF9-4C96-ABD1-088BFB13BDC7@microsoft.com...
> > > What version of Outlook is this using. In testing this code, I get

the
> > > following error.
> > > -278658801 at the objNS.GetSharedDefaultFolder(objRecip,
> > > Outlook.OlDefaultFolders.olFolderCalendar) line of code. I noticed in

> > your
> > > example, the Imports Outlook = Microsoft.Office.Interop.Outlook at the
> > > beginning. When I try that I don't have the choice for

..Interop.Outlook.
> > I
> > > only have the .Core option. Is this the reason it is erring out?

And,
> > I'm
> > > running Outlook 2002. Is this also a problem?
> > >
> > > "Sue Mosher [MVP-Outlook]" wrote:
> > >
> > > > If you are working in an Exchange organization and have Write access

to
> > the
> > > > other person's calendar folder, you can use the
> > > > Namespace.GetSharedDefaultFolder method to return the MAPIFolder

object,
> > > > then create a new item in it by using the Add method on its Items
> > > > collection. See http://www.outlookcode.com/codedetail.aspx?id=405

for a
> > code
> > > > sample.

> >
> > > >
> > > > "David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in

> > message
> > > > news:E12BEBD0-0B17-46CA-85FA-1DE1C24DA54A@microsoft.com...
> > > > > I want to write a VB.Net program that adds appointments and or

tasks
> > to a
> > > > > user's calendar or task list. I see through different examples

how to
> > do
> > > > > this but, it sends this appointment/task as an email request.

Once
> > this
> > > > > email is delivered, the user has to accept or decline it. Say for
> > > > example, I
> > > > > want to programatically add an appointment to John Doe's calendar.

> > Is
> > > > there
> > > > > a way to do that with out John's interaction so that when he opens
> > > > Outlook,
> > > > > it is there?
> > > > >
> > > > > Thanks,
> > > > > David Lindsey
> > > >
> > > >
> > > >

> >
> >
> >



  Reply With Quote
Old 06-08-2004, 08:35 PM   #6
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Adding Appointment to a user's calendar

No clue. .NET is still a jungle for me. Did you change the project reference
for Outlook to point to the downloaded PIA?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in message
news:A310CC34-D59A-4A99-A637-7D8382FEF90E@microsoft.com...
> Ok, I downloaded the PIA's for 2002 but still get the same error. Any

ideas?
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
> > Outlook 2003. Did you download the PIAs for Outlook 2002?


> >
> > "David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in

message
> > news:58A87B22-7DF9-4C96-ABD1-088BFB13BDC7@microsoft.com...
> > > What version of Outlook is this using. In testing this code, I get

the
> > > following error.
> > > -278658801 at the objNS.GetSharedDefaultFolder(objRecip,
> > > Outlook.OlDefaultFolders.olFolderCalendar) line of code. I noticed in

> > your
> > > example, the Imports Outlook = Microsoft.Office.Interop.Outlook at the
> > > beginning. When I try that I don't have the choice for

..Interop.Outlook.
> > I
> > > only have the .Core option. Is this the reason it is erring out?

And,
> > I'm
> > > running Outlook 2002. Is this also a problem?
> > >
> > > "Sue Mosher [MVP-Outlook]" wrote:
> > >
> > > > If you are working in an Exchange organization and have Write access

to
> > the
> > > > other person's calendar folder, you can use the
> > > > Namespace.GetSharedDefaultFolder method to return the MAPIFolder

object,
> > > > then create a new item in it by using the Add method on its Items
> > > > collection. See http://www.outlookcode.com/codedetail.aspx?id=405

for a
> > code
> > > > sample.

> >
> > > >
> > > > "David Lindsey" <DavidLindsey@discussions.microsoft.com> wrote in

> > message
> > > > news:E12BEBD0-0B17-46CA-85FA-1DE1C24DA54A@microsoft.com...
> > > > > I want to write a VB.Net program that adds appointments and or

tasks
> > to a
> > > > > user's calendar or task list. I see through different examples

how to
> > do
> > > > > this but, it sends this appointment/task as an email request.

Once
> > this
> > > > > email is delivered, the user has to accept or decline it. Say for
> > > > example, I
> > > > > want to programatically add an appointment to John Doe's calendar.

> > Is
> > > > there
> > > > > a way to do that with out John's interaction so that when he opens
> > > > Outlook,
> > > > > it is there?
> > > > >
> > > > > Thanks,
> > > > > David Lindsey
> > > >
> > > >
> > > >

> >
> >
> >



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off