Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activate Notepad and View .txt Document

Status
Not open for further replies.

ProjectExplorer

Programmer
Mar 22, 2002
95
GB
I am using code which exports data as a text file. Creating the text file is fine but does anyone know how to activate Notepad using code and view the document?

Any help appreciated.

Many thanks.
 
I use:

Application.FollowHyperlink strLocation, , True

where strLocation is a string variable with the full path name for any file, not just .txt files.
 
Hi!

I use the shell function:

[tt]shell "notepad.exe " & strPathAndName, vbNormalFocus[/tt]

Should it error, use full path also to Notepad.exe

HTH Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top