Some help with C# program?
Go to solution
Solved by gastew15,
What the program does is it has buttons that will open some Word documents that'll be on the same folder as the program, the problem is for it to work I need to supply Word with a path to the file, something like: "C:\Users\username\Downloads\Program_Folder\WordDocs\document.docx", but I need a way of not needing to "guess" the username of who will use it so it works, did that clear things up for you?
This here will let you have access to the to the current users downloads folder
<Code>
string pathUser = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
string pathDownload = Path.Combine(pathUser, "Downloads");
</Code>

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now