Saveas dialog

G

Guest

Hello,

I'm using the code below to save an MailItem to my harddrive as a back up
and digital archive. In the code there is an folder hard coded
(C:\Data\outlook\) I would like to Have a Dialog like File Save As tot pick a
certain folder on my harddrive

Can somebody help me out with this?

Thanks!
Dimitri

Sub SaveAsFile()
Dim myItem As Outlook.Inspector
Dim objItem As Object
Dim strname As String
Set myItem = Application.ActiveInspector
If Not TypeName(myItem) = "Nothing" Then
Set objItem = myItem.CurrentItem
objItem.SaveAs "C:\Data\outlook\" & "Test1.msg", olMSG
Else
MsgBox "There is no current active inspector."
End If
End Sub
 
G

Guest

Eric,

Is there not a way like Word and Excel. In here I can call the SaveAs Dialog
some thing like "dialogs(dlgFileSaveAs).show" The selected folder is then put
in a variable and can be used later on.

Greetings and thanks so far
Dimitri
 
G

Guest

No, because Win32 API's cannot be declared in VBScript. However, if you used
the CommonFileDialog control in a custom Outlook form you should be able to
automate that control in code. Keep in mind that the CommonFileDialog is not
very useful for selecting a directory, as it is file specific.

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/
 

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