|
-
May 10th, 2022, 10:54 AM
#1
Open office document, but prevent "Save As"
I am making a WinForms app using C#. The app has a database with documents (word, excel, pdf, etc...)
My requirement is that the user can save the document (which in turn the file will be updated in the database), but the user cannot make a copy / "Save As"
Ideally I need to do this for any file type, but for now let's start with Office documents.
I don't want to use macros.
Is there a parameter / argument that I can pass to Excel or Word to tell it to disable "Save As" option in the menu ?
Right now I use this code to open the files regardless of file type:
Code:
public static void OpenWithDefaultProgram(string path)
{
Process fileopener = new Process();
fileopener.StartInfo.FileName = "explorer";
fileopener.StartInfo.Arguments = "\"" + path + "\"";
fileopener.Start();
}
What are my options?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|