I have used the above source code. It is fine on visual studio but after changed to .exe file the word templete couldn't change the content. I think the path is on the StartupPath so it makes it by default Read Only file.
installation path = C:\Program Files (x86)\Ocean Ict Center\Setup
path on source code =
string samplePath = Application.StartupPath + Path.DirectorySeparatorChar + "Template.docx";
string docxPath = Application.StartupPath + Path.DirectorySeparatorChar + "Result.docx";
How it can be solved?
You can also show me how to use Report Viewer with Ms Access database with the source code above.
For more the source file and the description found in the first replay, following the link, copy and paste on you browser:
Tuhin PaulPosted Apr 15, 2023, 11:26 AM
code snippet that shows how to load data into the dataset using an OleDbDataAdapter
assuming that you have a table named "Customers" in your MS Access database.
Tuhin PaulPosted Apr 15, 2023, 11:25 AM
To solve the issue with the file being read-only in the installation directory, you can try copying the file to a different directory where the user has write permissions, such as the user's Documents folder.
Rajkiran SwainPosted Apr 13, 2023, 11:46 AM
NURU DAWUDPosted Mar 30, 2023, 2:50 PM
copy and paste to get the Source file and the description:
https://www.c-sharpcorner.com/UploadFile/38268a/create-word-document-from-win-form-with-users-data/