How To get the paht to my current directory?



I am trying to read from a text file like this:

StreamReader sr = new StreamReader(Application.StartupPath);

but because the Application.StartupPath = "C:\Program Files\Microsoft
I cant read the file from the add in directory

how can i get the path?

Ken Slovak - [MVP - Outlook]

This really should be posted to a C# or .NET group, it has nothing at all to
do with Outlook.

Use Assembly.GetExecutingAssembly().Location to get the location where the
code is installed.

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