How to convert a Folder into a zip file in Navision

chandrurecchandrurec Member Posts: 560
Hi,

I want to convert a folder into a zip file and then attach this zip file in the mail which i am going to send to the customer.Is it possible to convert the folder into a zip file in navision. If so please tell me the steps which i nedd to follow to convert the folder into a zip file.The entire process should happen automatically just by a click of a button.

The next doubt which i have is,

Is there any codeunit through which i can able to do attachment before sending the mail automatically without manually attaching the file.

please tell me the codeunit or batch job number in navsion 5.0 .


Thanks in Advance

bye.............

Comments

  • kapamaroukapamarou Member Posts: 1,152
    Regarding the mail you need to see codeunit 397 Mail and the function NewMessage with it's parameters.

    Regarding the zip file compression you could use an automation or you could use the command line interface of the compression utilities (such as Winzip or Winrar) but I haven't done something similar yet so I cannot help you with this right now...
  • chandrurecchandrurec Member Posts: 560
    Thanks a lot
  • kapamaroukapamarou Member Posts: 1,152
    You're welcome. If you'd like, when you have finished let us know which route you followed for the compression issue and what you found to be the best solution.
  • apankoapanko Member Posts: 70
    Zip - http://dynamicsuser.net/blogs/dynamicsl ... tures.aspx

    Mail - codeunit 400 (since NAV 5).
  • chandrurecchandrurec Member Posts: 560
    Hi all,

    I found out the method of how to automatically convert a folder into a zip file in navision. It is possible using shell automation.

    try to convert using the shell automation. It will work fine.

    Enjoy!!!!!!!!!!


    bye........
  • amarnathamarnath Member Posts: 51
    Hi chandru
    Can you send the automation code for converting the folder to zip file.
    AMARNATH SRINATH
  • chandrurecchandrurec Member Posts: 560
    This is the code for converting folder to zip file


    ZipFile.CREATE('C:\CustomerStatement.zip');
    ZipFile.WRITE(IntVal);
    FOR i:=1 TO 9 DO
    ZipFile.WRITE(IntVal);
    ZipFile.CLOSE;
    CREATE(Shell32);
    ZIPFolder:=Shell32.NameSpace('C:\CustomerStatement.zip');
    txtFileName := 'C:\Temp';
    ZIPFolder.CopyHere(txtFileName);

    Try this code it will surely work.

    Enjoy!!!!!!!!


    bye....
Sign In or Register to comment.