Document Path

lloydsmodslloydsmods Member Posts: 93
I need to be able to browse for a file, select it and then save the file path and file name to a text field. But, I don't want to use an automation variable to do it. Can this be done?

I see lots of posts that say "use codeunit 412" but none of them really explain how.
If guns cause crime mine must be defective.

Answers

  • AlbertvhAlbertvh Member Posts: 516
    Hi
    do something like this

    Filename := ComDiaMgt.OpenFile('Select Text Object File to Open','C:\*.txt',1,'',0);
    

    where Filename is type text length 250
    ComDiaMgt is codeunit 412

    Filename while have the pathname and filename of the file that is selected by the user.


    Hope this helps

    Albert
  • lloydsmodslloydsmods Member Posts: 93
    Thanks, Albert.
    If guns cause crime mine must be defective.
  • AlbertvhAlbertvh Member Posts: 516
    Glad to have helped :D
Sign In or Register to comment.