Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Error with Outlook.dll


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-12-2007, 09:46 AM
Knows the basics
 
Join Date: May 2007
Posts: 82
Default Error with Outlook.dll

When I run app with Outlook.dll I got error:

"An error occurred on sub app_start.

Line number: 5

Error description:
TargetInvocationException"

And I need a sample code to access Contacts in device, anybody help me?

Thank you.
Reply With Quote
  #2 (permalink)  
Old 09-12-2007, 11:29 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,806
Default

Do you run it on the device?
Outlook library is only supported on WM5.0 and WM6.0 devices.
If it is a WM5.0 device you should install .Net CF 2.0 and follow these instructions:
www.basic4ppc.com/netcf2.html
Reply With Quote
  #3 (permalink)  
Old 09-13-2007, 04:28 AM
Knows the basics
 
Join Date: May 2007
Posts: 82
Default

Yes, I run on device and my PPC use WM6.0
Reply With Quote
  #4 (permalink)  
Old 09-13-2007, 07:43 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,806
Default

Can you post the code that gives you the error message?

Here is a code to show all the contacts (from the library manual):
Don't forget to add the two objects and create a form with a ListBox.
Code:
'Contact is a Contact object and ContactsCollection is a PimCollection object. Sub Globals End Sub Sub App_Start Form1.Show Contact.New1 ContactsCollection.New1("Contacts") ContactsCollection.SortItems("FirstName",false) 'sorts the contacts using the first name field. For i = 0 to ContactsCollection.Count - 1 Contact.Value = ContactsCollection.GetItem(i) ListBox1.Add(Contact.FirstName & " " & Contact.LastName) 'Add the contact's first and last name to ListBox1. Next
End Sub
Reply With Quote
  #5 (permalink)  
Old 09-15-2007, 05:06 AM
Knows the basics
 
Join Date: May 2007
Posts: 82
Default

Thank you, Erel

I run your code and got an errror:

"Line 11

Error description:
Syntax error."

What's wrong?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error loading pogram.\folder\Outlook.dll berndgoedecke Questions & Help Needed 6 04-22-2008 03:24 PM
SMS in Outlook Alex812 Basic4ppc Wishlist 3 01-20-2008 09:32 AM
Problems with outlook.dll Gerd Bug Reports 5 12-14-2007 12:35 PM
outlook.dll with WM2003SE luckyluc78 Basic4ppc Wishlist 0 09-26-2007 08:41 AM
Outlook.dll error after compiling Graley Questions & Help Needed 1 09-14-2007 05:30 PM


All times are GMT. The time now is 10:16 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0