How to check opened excel file closed or not from Navision

upasanisandipupasanisandip Member Posts: 405
Hi,
I have opened excel file from Navision (used 'Microsoft Excel 11.0 Object Library'.Application). Now I want to check whether that file is closed or still open from Navision.

Is it possible?

thanks,
sandip.

Comments

  • kinekine Member Posts: 12,562
    You can try to open it for writing. If it fail, it is still opened. May be it will work.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • upasanisandipupasanisandip Member Posts: 405
    Thanks kine,
    But my problem is different, I want to delete that file if it is closed.
    I only want boolean value , files is closed "True" or "False"
    If you know about Handler or sample code is threre (for excel application) then plz. post it.

    many thanks
  • kinekine Member Posts: 12,562
    The reult is True/False if done correctly. You can than use it in a loop or timer to check it and delete the file if you find out that the file is accessible.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.