FileDialog to get user selected folder

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.
 
S

Southern at Heart

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top