pimstore.tlb vb.net

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

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("(e-mail address removed)")

I notice the windows mobile 5 code you use appt.Recipients.Add("(e-mail address removed)","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("(e-mail address removed)")
appt.Body = "test body"
appt.Save()
outlookApp.Logoff()

Thanks in advance
 
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

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("(e-mail address removed)")

I notice the windows mobile 5 code you use
appt.Recipients.Add("(e-mail address removed)","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("(e-mail address removed)")
appt.Body = "test body"
appt.Save()
outlookApp.Logoff()

Thanks in advance
 
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
 
Back
Top