Hi Folks,
i want to open an Outlook-Taskitem with Automation, wich is already created. I have the "Entry-ID" of the Task-Item, but searching for Open- or Search-Methods. Is there a special way to open it ?
And now to something different:
How can I move Characters like "Line Feed" (13/10) to a Textfield?
Regards
Stefan
0
Comments
You can search like this also (in this case contacts whith custom fields for storing the prospectno. and the contactno. and probably not the correct translation of field names):
OlItems := OlMapiFolder.Items.Restrict('[Prospectno] = "' + Prospectno + '" AND [Contactno] = "' + Contactno + '"');
IF OlItems.Count = 0 THEN
EXIT(FALSE)
ELSE
OlContact := OlMapiFolder.Items.Find('[Prospectno] = "' + Prospectno + '" AND [Contactno] = "' + Contactno + '"');
EXIT(TRUE);
Line Feed You can add like this:
Create a var of type char and assign that a value like this
CR := 13;
IF You wan't thre line feeds You do like this:
FORMAT(CR)+FORMAT(CR)+FORMAT(CR)
Hope that helps
//Lars
http://www.linkedin.com/in/larswestman
based on your advise i builded this code:
IF Rec."Outlook Refer" <> '' THEN BEGIN
OutlItems := OutlMapiFolder.Items.Restrict('[EntryID] = '+Rec."Outlook Refer");
IF OutlItems.Count = 0 THEN
OutlTaskItem := OutLAppl.CreateItem(3)
ELSE
OutlTaskItem := OutlMapiFolder.Items.Find('[EntryID] = '+Rec."Outlook Refer");
...
(Rec is a Navision Table that contents the Entry ID of the TaskItem)
but i only got the Error-Message 'The Call to Member Restrict failed. Condition cannot be parsed'
what did i wrong?
Stefan
It should be:
IF Rec."Outlook Refer" <> '' THEN BEGIN
OutlItems := OutlMapiFolder.Items.Restrict('[EntryID] = "'+Rec."Outlook Refer" + '"');
IF OutlItems.Count = 0 THEN
OutlTaskItem := OutLAppl.CreateItem(3)
ELSE
OutlTaskItem := OutlMapiFolder.Items.Find('[EntryID] = "'+Rec."Outlook Refer" + '"');
You can see the correct syntax in the MS Outlook Help for it's Object Library (which You can open from the script editor in Outlook)
/Lars
http://www.linkedin.com/in/larswestman
thats it! But unfortunally the ENTRYID is not allowed in "Restrict" or "Find". This is "Microsoft Live and colored", isnt it? I solved the problem now with the Property "Ordinal". If you have any suggestion for a better soluton,please tell me.
By the way in Outlook the "Date"-Type contents Date+Time, is that right?
How can i move a Time-Value from NF in an Outlook Date-Property (Example: Taskitem.ReminderTime)
Greetings Stefan
In any way I know this has been discussed at mynavision.net or navision.net, so if You search these forums You should find the solution.
//Lars
http://www.linkedin.com/in/larswestman