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

PidiPidi Member Posts: 35
edited 2005-01-06 in Navision Attain
:-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

Comments

  • kinekine Member Posts: 12,562
    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:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • PidiPidi Member Posts: 35
    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.

    Pidi
    Michael Peters
    Bos Fod GmbH Düsseldorf
    +49 2132 139-0
Sign In or Register to comment.