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.


writing appointment


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-23-2007, 05:22 PM
Junior Member
 
Join Date: Aug 2007
Location: The netherland, Geldrop
Posts: 23
Unhappy writing appointment

Tried to write an appointment into both PPC-outlook aswell Desktop-outlook.
Used the example code and added the newes DLL's to the project. Can't findback the results in outlook. There are no error-messages. What can be wrong

Last edited by paul j : 09-23-2007 at 05:26 PM.
Reply With Quote
  #2 (permalink)  
Old 09-23-2007, 06:16 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,985
Default

Can you show your code?
Reply With Quote
  #3 (permalink)  
Old 09-23-2007, 07:27 PM
Junior Member
 
Join Date: Aug 2007
Location: The netherland, Geldrop
Posts: 23
Default

i started with:
Appointment.new1
Appointment.Subject = aSubject
Appointment.Start = DateParse("10/25/2007") + (TimeParse("13:35") Mod cTicksPerDay)
PimCollection.AddItem(appointment.New1)

now i have the code, stille without results
Appointment.new1
PimCollection.New1("Appointments")
Appointment.New1
Appointment.Subject = aSubject
Appointment.AllDayEvent = true
Appointment.Start = DateParse(aDate)
PimCollection.AddItem(appointment.New1)
Reply With Quote
  #4 (permalink)  
Old 09-23-2007, 08:00 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,985
Default

You should change this line:
PimCollection.AddItem(appointment.New1)
to:
PimCollection.AddItem(appointment.Value)
Reply With Quote
  #5 (permalink)  
Old 09-23-2007, 08:48 PM
Junior Member
 
Join Date: Aug 2007
Location: The netherland, Geldrop
Posts: 23
Default

Hi Erel,

I Already found the change you mentioned, but stil without resuls. I looked into the watch and found for the date(appointment.start.value) = 01/01/0001. I don't think I want an appointment in this year. Value for appointment.Subject = 0

all this with the code :

adate = "02/17/2007"
aSubject = "test"

Appointment.new1
Appointment.CreateNew
Appointment.Subject = aSubject
Appointment.AllDayEvent = true
Appointment.Start = DateParse(aDate)
PimCollection.New1("Appointments")
PimCollection.AddItem(appointment.value)
Reply With Quote
  #6 (permalink)  
Old 09-24-2007, 06:45 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,985
Default

I've checked your code and it works fine.
You should check Date(Appointment.Start) (without the 'value').
If it still doesn't work please upload your code.
Reply With Quote
  #7 (permalink)  
Old 09-24-2007, 05:46 PM
Junior Member
 
Join Date: Aug 2007
Location: The netherland, Geldrop
Posts: 23
Default

Hi Erl,
I think I have to experiment with the dateformat. Normaly in the Netherlands we use dd-mm-yyyy. In the debugger yhe dateparse gives back a 0(zero) withe the format mm/dd/yyyy is returns a proper count of ticks

Sub Globals
DateFormat("dd-mm-yyyyy")
End Sub

Sub App_Start
frmMain.show

End Sub


Sub GetDate
Dim Date, subject

NewDate ="17/10/2007"
subject = "test"

AddAppointment(NewDate,subject)

End Sub

Sub AddAppointment(aDate, aSubject)
'pre aDate and aSubject have correct values
'post event has been added into the calender

Appointment.new1
Appointment.CreateNew
Appointment.Subject = aSubject
Appointment.AllDayEvent = true
Appointment.Start = DateParse(aDate)
PimCollection.New1("Appointments")
PimCollection.AddItem(appointment.value)
Msgbox(PimCollection.Count)

End Sub

Last edited by paul j : 09-24-2007 at 05:58 PM.
Reply With Quote
  #8 (permalink)  
Old 09-24-2007, 05:58 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,985
Default

There is a new tutorial about Date and Time: http://www.basic4ppc.com/forum/forumdisplay.php?f=19
If you set DateFormat("dd-mm-yyyy") then you should later use the exactly same format in DateParse.
Note that you wrote an extra 'y' in DateFormat.
Reply With Quote
  #9 (permalink)  
Old 09-29-2007, 03:57 PM
Junior Member
 
Join Date: Aug 2007
Location: The netherland, Geldrop
Posts: 23
Default

Hi Erel,

it seems the Outlook objects doesn't accept te parameters. I tried several formats/system settings on mu Desktop and formatsettings in the code, but with the debugger the content of Appointment.start is always 01/01/0001 or 0 (zero) depending of the used formats and the PimAppointment.count is always 0 (zero). Scubaticus (another Dutch-user) and I have simulair problems with the system-settings and b4ppc combination.
Reply With Quote
  #10 (permalink)  
Old 09-29-2007, 04:07 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,985
Default

The Outlook library is only supported on the device.
The OutlookDesktop.dll file is only a "dummy" library to allow you to write your code on the desktop.
You should test it on the device.
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
No way to create a recurring appointment? kolbe Questions & Help Needed 2 07-02-2008 06:43 PM
Outlook appointment category Cableguy Questions & Help Needed 2 05-22-2008 08:36 PM
How to create a new appointment willisgt Questions & Help Needed 2 05-15-2008 08:21 PM
JPEG to byte array without writing to file brathbone Questions & Help Needed 2 03-01-2008 05:59 AM
Copy&paste in appointment Alex812 Questions & Help Needed 2 08-12-2007 12:52 PM


All times are GMT. The time now is 04:36 AM.


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