Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open File Dialog Box and save as a variable (97 and 2K)

    I have a piece of code that creates and Email in outlook, and prompts for a file name to attach. Instead of the user knowing the full path, I would like to open the standard Open File dialog box so that user can browse to select a file. I have not a clue where to begin. <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29> Hope sombody out there can help! (BTW - I'm using Win2KPro, and Access 97, although I will do the same for Access 2000 as well)

    Thanks!

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open File Dialog Box and save as a variable (97 and 2K)

    This attachment (A2k) will get you started.
    Attached Files Attached Files

  3. #3
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open File Dialog Box and save as a variable (97 and 2K)

    Thanks Dave! This looks just like what I need. I am having a bit of trouble figuring out which variable holds the file name selected - and does it carry just the name or the path as well? <img src=/S/please.gif border=0 alt=please width=31 height=23> (I'm trying to get both) Thanks for our help!

    Keith

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open File Dialog Box and save as a variable (97 and 2K)

    OFN.lpstrFileTitle is just the file name, and OFN.lpstrFile contains the full path plus file name.

  5. #5
    Star Lounger
    Join Date
    Jul 2003
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open File Dialog Box and save as a variable (97 and 2K)

    Many thanks! <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •