in my application (using Visual C++)i have multiple instance of Microsoft Word document and i need to close one perticular instance of Word which has no characters in it(i.e. close empty word document out of many instances). it should be a function and return value should be 1 if there is such document of Word which is empty and 0 if there is no such document on can any one help me out with this problem ? -anku
Hi =?Utf-8?B?YW5rdQ==?=, > in my application (using Visual C++)i have multiple instance of Microsoft > Word document and i need to close one perticular instance of Word which has > no characters in it(i.e. close empty word document out of many instances). it > should be a function and return value should be 1 if there is such document > of Word which is empty and 0 if there is no such document on > any empty document has a character count of "1" Document.Content.characters.Count To be absolutely sure nothing is in the document (headers, footers, etc.) you'd need to loop through all the StoryRanges (see the Help file for the Word object model, and note the examples for all topics related to StoryRanges) Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) 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 :-)