FileDialog to get user selected folder

  • Thread starter Thread starter Southern at Heart
  • Start date Start date
S

Southern at Heart

I can't seem to get this figured out: All I need is to save a text file that
is created by my code, and I would like to give the user the dialogbox that
pops up and lets them choose a folder. My code then knows what path they
chose, and saves the text file there. My text file is called Contacts.txt
If this isn't too hard, can someone please show me how to do this?
Thanks so much.
 
Thanks. That's a lot of code just to select a folder... I thought it'd just
be a couple lines. ...I use these few lines below to let the user pick an
Outlook folder:

Dim ol As New Outlook.Application
Dim olns As Outlook.NameSpace
Dim cf As Outlook.MAPIFolder
Set olns = ol.GetNamespace("MAPI")
Set cf = olns.PickFolder
If cf Is Nothing Then
MsgBox "No folder chosen ...action canceled"
End
End If
 
Back
Top