Change Folder via Automation

Alex
Member Posts: 54
Hello,
I want to creat a Meeting item in Outlook,
O.K all works fine, but i have a problem with
posting the Meeting Item into another folder.
Can anyone help !
I use followin code:
CREATE(application);
meeting := application.CreateItem(1);
meeting.Body := 'sjdhfjsafhdka';
...
meeting.Display;
CLEAR(application);
I want to creat a Meeting item in Outlook,
O.K all works fine, but i have a problem with
posting the Meeting Item into another folder.
Can anyone help !
I use followin code:
CREATE(application);
meeting := application.CreateItem(1);
meeting.Body := 'sjdhfjsafhdka';
...
meeting.Display;
CLEAR(application);
Best regards
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf
0
Comments
-
see topic "MS Outlook Automation",
creating contact in subfolder.0 -
Is it possible that somebody puts here some sample Cal code on how to create an appointment with a specific start and end time and date in a calender that isn't his own ???
Its very hard to figure out how to do it without any examples.
Rgds
Benny GiebensRgds
Benny Giebens0 -
Thank, i know but if i use following code
olContactFolder := olApp.GetNamespace'Mapi').
GetDefaultFolder(10).Folders.Item('Subfolder');
who must i define olContactFolder ,
(automation,Outlook,???folders?)
and in which format must i enter the new Subfoler
Thank AlexBest regards
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf0 -
Vars:
application:Automation:'Microsoft Outlook 98 Object Model'.Application
ContactItem:Automation:'Microsoft Outlook 98 Object Model'.ContactItem
olContactFolder:Automation:'Microsoft Outlook 98 Object Model'.MAPIFolder
expfld : Text : 30
Code:
// create item ...
ContactItem := application.CreateItem(2);//contact item
ContactItem.FirstName := rec."Name";
ContactItem.Close(0); //Save contact
// move to subfolder ...
expfld := 'subfolder name';
olContactFolder := application.GetNamespace('MAPI').GetDefaultFolder(10).Folders.Item(expfld);
ContactItem.Move(olContactFolder);0 -
Thanks a lot !
But the var: expfld := 'text@test.com' must look like this ?
The Contact is alway placed in my standard folder Contact and i get an Error like item could not created ...Best regards
Alex Schubert
ERP & Navision
Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf0 -
Does subfolder 'text@test.com' of contact folder exists?
if does not - then error occurs.
I still cannot create a new folder from C/AL.0
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