"Peter Foot [MVP]" <feedback@nospam-inthehand.com> wrote in message
news:44E49F1A-6BFE-4B27-B9A1-568A09828443@microsoft.com...
> The native IRecipients.Add method takes the display name of the recipient
> and returns a new IRecipient which you use to add the email address for
> the recipient.
>
> Peter
>
> --
> Peter Foot
> Device Application Development MVP
>
www.peterfoot.net |
www.inthehand.com >
> "Dave" <mail@mail.co.uk> wrote in message
> news:ueq58j0OHHA.3872@TK2MSFTNGP06.phx.gbl...
> Hi All,
>
> I've got the example from:
>
http://blogs.gotdotnet.com/stevenpr/rss_tag_Interop.xml to work e.g show
> contact/add appointments.
>
> My problem is if I try to add a recipient to the appointment I get a an
> error {"The parameter is incorrect.} when calling save., below is my code
> which works if I remove the appt.Recipients.Add("test@test.co.uk")
>
> I notice the windows mobile 5 code you use
> appt.Recipients.Add("test@test.co.uk","MyName"") but this overload is not
> an option when using the Interop.PocketOutlook.dll.
>
> I'm using 2003 so fully managed is not an option.
>
> Dim outlookApp As PocketOutlook.ApplicationClass
> outlookApp = New PocketOutlook.ApplicationClass()
> outlookApp.Logon(0)
> Dim apptsFolder As PocketOutlook.Folder =
> outlookApp.GetDefaultFolder(PocketOutlook.OlDefaultFolders.olFolderCalendar)
> Dim appts As PocketOutlook.Items = apptsFolder.Items
> Dim appt As PocketOutlook.AppointmentItem = appts.Add()
> appt.Start = Now()
> appt.End = Now()
> appt.Duration = 1appt.Subject = "Test"
> appt.Recipients.Add("test@test.co.uk")
> appt.Body = "test body"
> appt.Save()
> outlookApp.Logoff()
>
> Thanks in advance