Change Folder via Automation

AlexAlex Member Posts: 54
edited 2000-01-18 in Navision Financials
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);
Best regards
Alex Schubert

ERP & Navision

Dolphin Communication Technologies GmbH
Otto-Hahnstr. 1 c
D-69190 Walldorf

Comments

  • Jem_AhmetJem_Ahmet Member Posts: 27
    see topic "MS Outlook Automation",
    creating contact in subfolder.
  • BennyGiebensBennyGiebens Member Posts: 43
    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 Giebens
    Rgds
    Benny Giebens
  • AlexAlex Member Posts: 54
    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 Alex
    Best regards
    Alex Schubert

    ERP & Navision

    Dolphin Communication Technologies GmbH
    Otto-Hahnstr. 1 c
    D-69190 Walldorf
  • Jem_AhmetJem_Ahmet Member Posts: 27
    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);
  • AlexAlex Member Posts: 54
    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 Walldorf
  • Jem_AhmetJem_Ahmet Member Posts: 27
    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.
Sign In or Register to comment.