:-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
Michael Peters
Bos Fod GmbH Düsseldorf
+49 2132 139-0
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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.
Pidi
Bos Fod GmbH Düsseldorf
+49 2132 139-0