word automation problem
Posted
by daemonkid
on Stack Overflow
See other posts from Stack Overflow
or by daemonkid
Published on 2010-06-02T11:31:51Z
Indexed on
2010/06/02
11:34 UTC
Read the original article
Hit count: 269
c#
|word-automation
I am trying open a word document for manipulation. However in the code below 'wordApp.Selection' is always null
object missing = System.Reflection.Missing.Value;
Word._Application wordApp = new Word.Application();
Word._Document aDoc =wordApp.Documents.Open(ref fPath1, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
Word.Selection selection = wordApp.Selection
Any ideas on how what I am missing here. Why is wordApp.Selection getting set as null.?
Thanks.
© Stack Overflow or respective owner