Groups | Blog | Home
all groups > dotnet compact framework > january 2007 >

dotnet compact framework : pimstore.tlb vb.net


Dave
1/18/2007 9:38:25 PM
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 =3D New PocketOutlook.ApplicationClass()
outlookApp.Logon(0)
Dim apptsFolder As PocketOutlook.Folder =3D =
outlookApp.GetDefaultFolder(PocketOutlook.OlDefaultFolders.olFolderCalend=
ar)
Dim appts As PocketOutlook.Items =3D apptsFolder.Items
Dim appt As PocketOutlook.AppointmentItem =3D appts.Add()
appt.Start =3D Now()
appt.End =3D Now()
appt.Duration =3D 1appt.Subject =3D "Test"=20
appt.Recipients.Add("test@test.co.uk")
appt.Body =3D "test body"
appt.Save()
outlookApp.Logoff()

Peter Foot [MVP]
1/19/2007 10:52:01 AM
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

[quoted text, click to view]
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
Dave
1/19/2007 9:25:25 PM
Hi Peter,

Sorry, still new to all this.

I've tried this but still getting a error am I going in the right direction?

E.g

Dim contactsFolder As PocketOutlook.Folder =
outlookApp.GetDefaultFolder(PocketOutlook.OlDefaultFolders.olFolderContacts)

Dim Restrict As String = "[Email3Address] = """ & mList.ItemData & """"

Dim contacts As PocketOutlook.ContactItem =
contactsFolder.Items.Find(Restrict)

Dim ContactDisplayName As String = String.Empty

ContactDisplayName = contacts.FirstName & " " & contacts.LastName ' E.G this
returns Test User

appt.Recipients.Add(ContactDisplayName)

Thanks in advance


[quoted text, click to view]

Sheethal
9/2/2007 6:47:31 PM
Hi All

I am having the same problem when I tried adding Recipients to an appointment using Interop.Pocketoutlook. ('The paramete is incorrect')

newAppointment.Recipients.Add("Shethal@gmail.com");

Can anyone suggest a method to add Recipients to an appointment in PDA with windows mobile 2003.

Thanks
Sheethal



From http://www.developmentnow.com/g/18_2007_1_0_0_912840/pimstore-tlb-vb-net.htm

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button