Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sending Outlook appointments (VB6 SP5)

    I've see examples of how to create an outlook appointment in VB, but as yet I havent found any that includes adding people to the attendees/invite list.

    Im trying to find out how to send people appointments. I don't need them created anywhere locally, in fact I'd prefer them not to be. We have some CRM software integrated into our program and i'd like to be able to give the users the ability to send outlook appointments to the reps.

    Any help would be much appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    An AppointmentItem object becomes a MeetingItem by setting its MeetingStatus to olMeeting. The invitees are Recipients. From the online help for Outlook 2002 VBA:

    Set myItem = myOlApp.CreateItem(olAppointmentItem)
    myItem.MeetingStatus = olMeeting
    myItem.Subject = "Strategy Meeting"
    myItem.Location = "Conference Room B"
    myItem.Start = #9/24/97 1:30:00 PM#
    myItem.Duration = 90
    Set myRequiredAttendee = myItem.Recipients.Add("Nate Sun")
    myRequiredAttendee.Type = olRequired
    Set myOptionalAttendee = myItem.Recipients.Add("Kevin Kennedy")
    myOptionalAttendee.Type = olOptional
    Set myResourceAttendee = myItem.Recipients.Add("Conference Room B")
    myResourceAttendee.Type = olResource
    myItem.Send

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    Cool, thanks Hans.

    Almost got it working except one bit, therefore, one quick question....

    What is myRequiredAttendee defined as?

  4. #4
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    Saying that, myItem.Recipients.Add "philipj" works fine.

    Thanks for the excellent info as per usual Hans. A great help.
    Regards,

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    The online help does not use "Option Explicit" <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    I assume that it is a variable of type Recipient.

  6. #6
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    I don't suppose you know if its possible to set the owner of the appointment? I'm sending the appointments from the server as it's the central point, but i'd like to be able to send the appointment in the name of someone else.

    Therefore, when an appointment gets sent:

    Mr Blonde gets the main appointment
    Mr White gets an appointment invitation that when accepted/declined goes to Mr Blonde
    Mr Pink gets an appointment invitation that when accepted/declined goes to Mr Blonde

    etc.

    Hopefully that was a clear explanation!!!

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    I don't think you can change the owner - it's a security feature. Similarly, you can't change the sender of an e-mail (SenderName is a read-only property). The MailItem object has a SentOnBehalfOfName property that can be set if you have the appropriate permissions, but that doesn't seem to be a property of the MeetingItem object.

  8. #8
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    Thanks Hans.

    We use a third party component called VbSendmail.dll for sending emails with another name as the sender (with the name in questions permission before anyone says anything!). I'm currently looking to see if appointments are possible using it, but so far no luck.

    If anyone knows of any 3rd party component (not necessarily free) that can perform this function i'll be very grateful too!

    Regards,
    Phil

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    I haven't tried this myself, but according to AppointmentItem Object in MSDN, Sender is a read/write property if you use the CDO library (Microsoft CDO 1.21 Object Library, cdo.dll)

  10. #10
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    Excellent, thanks Hans. Just taking a look into it now.

    Sorry for the delay with the reply - we've had a spam filter server installed which currently catches practically every email until they're visually checked and released, nightmare!

  11. #11
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    Im still researching but I thought i'd add the following comments for anyone else trying the same sort of thing.

    RE: CDO - its installed with Exchange, to get it installed on my PC with Outlook 2000 I had to make a transform file to pick up Collaboration Data Objects in the install options.
    While looking into CDO I found that a newer technique uses Outlook Redemption (http://www.dimastr.com/redemption/). CDO has issues with security prompts since all of the outlook security patches were release and apparently redemption gets round this - I have only just started looking into it though.

    Any further info I find i'll edit this post and add it in.

  12. #12
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    You can find some code samples for Redemption programming in the Lounge. Where Dmitry has documented the steps or created "safe" replacement functions, it's very straightforward. The more you want to dig under the covers and access functionality missing from the Outlook object model, the more obscure it seems to get. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  13. #13
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    Boy is that ever the truth!
    Wendell

  14. #14
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    I agree with that too!

    At the moment I'm taking another look at CDO before attempting to work out Redemption.

    I've noticed that the AppointmentItem Organizer property is read only, but the Sender property is read/write. I'll post my findings here and depending on the outcome, i'll move onto Redemption after. I'll confuse myself if I keep switching from one to the other <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15>

    Any tips on which would be the preffered method for solving my problem would be much appreciated.

  15. #15
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Outlook appointments (VB6 SP5)

    I had a recommendation to look into iCalendar and vCalendar items (not sure if that is the right word). So far, it seems that these are sent as text files and need to be imported. Can anyone confirm this at all? Or is there a way for them to appear as an appointment email that the user can accept/decline?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •