Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 20 Dec 2005 11:03:23 -0800,    group: microsoft.public.word.oleinterop        back       


COM problem   
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
date: Tue, 20 Dec 2005 11:03:23 -0800   author:   anku

Re: COM problem   
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 :-)
date: Thu, 22 Dec 2005 12:12:29 +0100   author:   Cindy M -WordMVP-

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us