A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How To get the paht to my current directory?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 24th 08, 07:26 AM posted to microsoft.public.outlook.program_addins
pc_adv
external usenet poster
 
Posts: 1
Default How To get the paht to my current directory?

hello,
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
Office\Office12"
I cant read the file from the add in directory

how can i get the path?
--
thank you...
Ads
  #2  
Old September 24th 08, 03:10 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How To get the paht to my current directory?

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"pc_adv" wrote in message
...
hello,
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
Office\Office12"
I cant read the file from the add in directory

how can i get the path?
--
thank you...


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make my calendar open to the current week not the current Pat Outlook - Calandaring 0 March 28th 08 10:03 PM
what is an LDAP directory Shirl Outlook - Using Contacts 3 October 10th 07 03:33 AM
Adding days expired in current year and days remaining in current prezoneday Outlook - Calandaring 1 February 2nd 07 02:26 AM
LDAP Directory flossie Outlook - Using Contacts 1 August 1st 06 04:45 AM
directory for uploads... Jim Wood Outlook Express 2 June 7th 06 09:19 PM


All times are GMT +1. The time now is 08:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.