Re: Object reference not set to an instance of an object
- From: Cindy M. <C.Meister-C@xxxxxxxxxx>
- Date: Mon, 30 Apr 2007 17:36:17 +0200
Hi =?Utf-8?B?QmFkaXM=?=,
Object oName = "C:\\improvement.doc";Try declaring wrdDoc like this
Word.Application wrdApp;
Word._Document wrdDoc;
wrdApp = new Word.Application();
wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse,
ref oMissing, ref oMissing);
wrdDoc.Select();
So, Why it's telling me that wrdDoc.Select(); "is not set to an instance of
an object." when it's accessed from a remote machine but not when running it
locally in debug mode!!?
Word.Document wrdDoc
You aren't supposed to use the classes whose names begin with an underscore.
Don't know if this will do it for you, but worth a try.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
.
- Prev by Date: How to retrieve a Document window's coordinates
- Previous by thread: How to retrieve a Document window's coordinates
- Index(es):
Relevant Pages
|