Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Blank page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
donbowyer - 24 Feb 2006 17:37 GMT
Is there a simple test to determine whether or not a worksheet / page is
blank. By blank, I mean with no text.
Signature

donwb

Jonathan West - 24 Feb 2006 18:21 GMT
I think this question is about Excel. You have posted to a group that deals
with VBA in Word. The Excel exports are at
microsoft.public.excel.programming. You may have a better chance of a useful
reply if you repost there.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

> Is there a simple test to determine whether or not a worksheet / page is
> blank. By blank, I mean with no text.
Tony Jollans - 24 Feb 2006 19:28 GMT
This is a Word group. If you really mean worksheet, you want to be asking in
an Excel group.

If you mean a page in a Word document the answer is really "no" as a page
isn't a structural element of a document (it's just (part of) the result of
formatting a document for a printer)  However there are ways of accessing
pages, for example Selection.Bookmarks("\Page"), and you can check the
contents.

A problem in giving you code is that "no text" can mean a lot of things.
Word does not usually have blank pages so any page you look at will have
"text" even if that is just an instruction to leave the page blank (a page
break, or maybe a section break, or ...), so I'm going to have to ask you to
define blank a bit more fully.

--
Enjoy,
Tony

> Is there a simple test to determine whether or not a worksheet / page is
> blank. By blank, I mean with no text.
> --
> donwb
donbowyer - 25 Feb 2006 10:21 GMT
Thanks Tony
More specifically, I mean document not page.
The document I need to check for being "blank" - ie no text typed in it - is
the blank one Word presents you when you first open MS Word or the one you
get when you click on "new blank document".
Signature

donwb

> This is a Word group. If you really mean worksheet, you want to be asking in
> an Excel group.
[quoted text clipped - 19 lines]
> > --
> > donwb
Tony Jollans - 25 Feb 2006 11:06 GMT
Rather than checking the content, perhaps ..

   If ActiveDocument.Saved = True Then
       ' It has not been changed.

It's not quite the same thing but might meet your needs.

Otherwise, ...

   If Len(ActiveDocumnet.Content) > 1 Then
       ' It is not empty

--
Enjoy,
Tony

> Thanks Tony
> More specifically, I mean document not page.
[quoted text clipped - 27 lines]
> > > --
> > > donwb
donbowyer - 26 Feb 2006 01:27 GMT
Hi again Tony

Many thanks - that's it!
If Len(doc)>1 then it's not empty is just what I needed.
Thanks again
Signature

donwb

> Rather than checking the content, perhaps ..
>
[quoted text clipped - 51 lines]
> > > > --
> > > > donwb

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.