question

pakojonez avatar image
0 Votes"
pakojonez asked ·

Open template and set contents with Xml file with ShellHelper.OpenFile hangs

Hi all,

I have inside a C# windows application a piece of code to open the word using a command like this:

ShellHelper.OpenFile("Winword.exe", "/n /f @"C:\template.dotx" /xmlFile:@"C:\data.xml")

But now & then and mostly on Windows 10 this hangs and doesn't work at all.

Am I passing some parameter wrong here? Should I be doing this in a different way?

dotnet-csharp
· 2
10 |1000 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.


Word can be started with Process.Start. Show some details about ShellHelper.OpenFile.

0 Votes 0 ·

@pakojonez
As the tag "office-word-itpro" focus more on general issues of Word clients, but your issue is more realted tp code, I would remove this tag.
Thanks fo your understanding.

0 Votes 0 ·

1 Answer

pakojonez avatar image
1 Vote"
pakojonez answered ·

Found out what it was. When aplying the template, it has C# code associated that used clipboard. And I have Ditto installed, it seemed to interfere somehow.

Turned it of and began to work like a charm.

Thank you all.

·
10 |1000 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.