macro to open a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone tell me how to create a macro to open a file on my computer within
outlook? There are several files that I need to look at when using outlook.
I have tried attaching them to a task or contact but there are still several
steps to open it. I was hoping for a quick way to open a file to view.

Thanks.
 
How about:

Public Sub ViewFile()
Dim cmd As String
cmd = "notepad somefile.txt"
Status = Shell(cmd, vbNormalFocus)
End Sub
 

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

Back
Top