J
Jimmy
I am trying to create documents from a template by automating word 2003
from c# 2005 using the following code
object tpo = (object)mastertemplatepath;
object n = Missing.Value;
object f = false;
object t = true;
WordInterOp.Document letter = wd.Documents.Add(ref tpo, ref
n, ref n, ref t);
The documents.add method takes 30 seconds or so to work during which
both the visual studio development environment and the copy of the word
application (also created from c#) both hang. Once the document finally
appears the subsequent code that substitutes placeholders in the text
with particular values works fairly quickly.
Any ideas why the documents.add method is so slow and how I can speed
things up? (30 seconds will not be acceptable to the users).
from c# 2005 using the following code
object tpo = (object)mastertemplatepath;
object n = Missing.Value;
object f = false;
object t = true;
WordInterOp.Document letter = wd.Documents.Add(ref tpo, ref
n, ref n, ref t);
The documents.add method takes 30 seconds or so to work during which
both the visual studio development environment and the copy of the word
application (also created from c#) both hang. Once the document finally
appears the subsequent code that substitutes placeholders in the text
with particular values works fairly quickly.
Any ideas why the documents.add method is so slow and how I can speed
things up? (30 seconds will not be acceptable to the users).