question

DineshkumarS-4414 avatar image
0 Votes"
DineshkumarS-4414 asked DineshkumarS-4414 commented

how to do this ? Word file should not quit untill instructed using c#

Using C# how to achieve this or implement this feature.

For my windows application a word or excel file will open based on the conditions and once opened the user will do some changes in the file like editing and adding a new contents to it and it should not close automatically we need to stop closing the environmental file which is already opened and it should be opened till the last step of instructions.

Can anyone suggest me any ideas for this and it will be helpful for me.
Thanks in advance.

dotnet-csharpwindows-formsdotnet-cli
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @DineshkumarS-4414, Under normal circumstances process.start(); will not automatically close. Did you set the relevant shutdown code?

0 Votes 0 ·

yes and thanks for the suggestion

0 Votes 0 ·

May I know if your problem has been solved?

0 Votes 0 ·
Show more comments

No I will check and get back to you

0 Votes 0 ·

Is there any update in this issue?

0 Votes 0 ·

1 Answer

rijwanansari avatar image
0 Votes"
rijwanansari answered DineshkumarS-4414 commented

Hi,

You can open a word or Excel file using condition, and it will not close automatically.

 if (condition)
 {
    this.Application.Documents.Open(@"C:\Test\NewDocument.docx");
 }


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey Thanks and I will check this out and let you know

0 Votes 0 ·