Outlook AC - appoinment´s Start parameter wrong data type?

Pidi
Member Posts: 35
:-k Hi everybody,
I´m using Automation Controls with 3.6 and every day I´m trying to find new posibilities what one could do with the MS scripting DLL´s (for all type of file functions) or the AC´s for office. However I found one severe problem, where I can neither find a solution nor a workaround.
Let me explain with an example using the Outlook AC:
IF ISCLEAR(OutlookApplication) THEN CREATE(OutlookApplication);
OutlookAppt := OutlookApplication.CreateItem(1);
*** OutlookAppt.Start(TODAY); ****
OutlookAppt.Duration(100);
OutlookAppt.Subject := TextZeile;
OutlookAppt.ReminderSet(TRUE);
OutlookAppt.Save;
CLEAR(OutlookAppt);
CLEAR(OutlookApplication);
// OutlookApplication is an Application Object of
// the AC "Microsoft Outlook 11.0 Object Library"
// Outlookappt is an AppointmenItem Object of
// the AC "Microsoft Outlook 11.0 Object Library"
This little piece of code creates an Outlook appointment Objekt, so I can set an appoinment entry within Outlook from within e.g. a codeunit.
However, if you look at the START property in line 3, the parameter I use is TODAY and by that its type is DATE.
If you go to Navision´s variable definition, into the definition of the AC and hit F1, you will fortunately get the complete MS-Help doc with the full reference of all objects and properties. If you now navigate to the description of the START property and look at the sample, you will find the folling statement:
myItem.Start = #9/24/2003 1:30:00 PM#
which clearly shows, that this property is supposed to accept not only a date, but also a time value.
Attain however won´t accept anything but a date type value, and if you use Attain´s C/AL symbol menu (F5) and navigate to OutlookAppt ->
Properties -> Start it will show at the bottom of that window:
[DATE Start :=] Start(DATE Start)
which shows, that it won´t accept anything, but a DATE type.
This is supposed to be an example for a phenomenom, that I meanwhile found with four or five different Automation controls, and I am really wondering, where Attain get the parameter´s type information from.
Is there anyone, who´s got any idea?
Pidi
I´m using Automation Controls with 3.6 and every day I´m trying to find new posibilities what one could do with the MS scripting DLL´s (for all type of file functions) or the AC´s for office. However I found one severe problem, where I can neither find a solution nor a workaround.
Let me explain with an example using the Outlook AC:
IF ISCLEAR(OutlookApplication) THEN CREATE(OutlookApplication);
OutlookAppt := OutlookApplication.CreateItem(1);
*** OutlookAppt.Start(TODAY); ****
OutlookAppt.Duration(100);
OutlookAppt.Subject := TextZeile;
OutlookAppt.ReminderSet(TRUE);
OutlookAppt.Save;
CLEAR(OutlookAppt);
CLEAR(OutlookApplication);
// OutlookApplication is an Application Object of
// the AC "Microsoft Outlook 11.0 Object Library"
// Outlookappt is an AppointmenItem Object of
// the AC "Microsoft Outlook 11.0 Object Library"
This little piece of code creates an Outlook appointment Objekt, so I can set an appoinment entry within Outlook from within e.g. a codeunit.
However, if you look at the START property in line 3, the parameter I use is TODAY and by that its type is DATE.
If you go to Navision´s variable definition, into the definition of the AC and hit F1, you will fortunately get the complete MS-Help doc with the full reference of all objects and properties. If you now navigate to the description of the START property and look at the sample, you will find the folling statement:
myItem.Start = #9/24/2003 1:30:00 PM#
which clearly shows, that this property is supposed to accept not only a date, but also a time value.
Attain however won´t accept anything but a date type value, and if you use Attain´s C/AL symbol menu (F5) and navigate to OutlookAppt ->
Properties -> Start it will show at the bottom of that window:
[DATE Start :=] Start(DATE Start)
which shows, that it won´t accept anything, but a DATE type.
This is supposed to be an example for a phenomenom, that I meanwhile found with four or five different Automation controls, and I am really wondering, where Attain get the parameter´s type information from.
Is there anyone, who´s got any idea?
Pidi
Michael Peters
Bos Fod GmbH Düsseldorf
+49 2132 139-0
Bos Fod GmbH Düsseldorf
+49 2132 139-0
0
Comments
-
If you search this forum (may be for Navision Financials) that you can find that this is old problem and there is dll in download which is solution for the outlook. It is some wrapper library... If you want, I can send it to you... :whistle:0
-
actually I did search the forum for this problem, before I wrote my
message, but couldn´t find it. But some of the keywords you used
in your response, were very helpfull.
I found the OCX, and - by the way - learned some danish ...
Thank you very much.
PidiMichael Peters
Bos Fod GmbH Düsseldorf
+49 2132 139-00
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions