Outlook Automation
 
            
                
                    Stefan_Limpert                
                
                    Member Posts: 30                
            
                        
            
                    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
                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
- 
            Hi Stefan
 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
 //LarsLars Westman
 http://www.linkedin.com/in/larswestman0
- 
            Thanks for your help Lars
 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?
 Stefan0
- 
            In Your example the quotes are wrong.
 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)
 /LarsLars Westman
 http://www.linkedin.com/in/larswestman0
- 
            Ok Lars,
 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 Stefan0
- 
            Look in the download section. There You have automation examples and i think a solution to Your problem.
 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.
 //LarsLars Westman
 http://www.linkedin.com/in/larswestman0
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
- 323 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
