Reputation: 39138
I've developed an add-in and now I'd like to enable it to store/retrieve settings upon the launch of Outlook. I've checked the current working directory using Environment.CurrentDirectory
but when I tried to File.WriteAllText
to it, I failed due to access rights. So, my question is twofold.
Upvotes: 1
Views: 56
Reputation:
I use the Environment
class as follows.
String dir = Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData);
A bit lengthy syntax but it does the job well. Not sure if you'll have full access rights from an add-in, though. Also, It'd be good to know if somebody will suggest a better storage method. Once I used a web service until I discovered that my user often will do his job while sitting on the train (read: off-line). It worked unless he didn't reboot his machine before getting on board.
Upvotes: 2