Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-18-2017, 07:21 PM
ilovevba ilovevba is offline How to check whether every first line of each page has word ? Windows 10 How to check whether every first line of each page has word ? Office 2013
Novice
How to check whether every first line of each page has word ?
 
Join Date: Jul 2017
Posts: 2
ilovevba is on a distinguished road
Red face How to check whether every first line of each page has word ?

Hi guys,



I am finding a way to use word vba to check whether the first line of each page contains word or not. If any pages don't contain words in the first line, I will leave a comment on the first page.

Any idea how to do this ? As the page collection in vba can't help me to do the task.
Reply With Quote
  #2  
Old 07-18-2017, 07:57 PM
gmayor's Avatar
gmayor gmayor is offline How to check whether every first line of each page has word ? Windows 10 How to check whether every first line of each page has word ? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

'Page' and 'line' are vague concepts in Word, which is not a page layout application. What constitutes a 'page' and a 'line' in your document? Are they intended to represent the pages and lines created by text flow, in which case what happens when the document is viewed on a different PC with a different printer driver which causes that flow to change? If you add a comment to the first page, will that not screw up the text flow for subsequent pages?

Without knowing how the document is laid out and what the aim of the process is, it is difficult to suggest a regime that would address it.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 07-18-2017, 08:12 PM
ilovevba ilovevba is offline How to check whether every first line of each page has word ? Windows 10 How to check whether every first line of each page has word ? Office 2013
Novice
How to check whether every first line of each page has word ?
 
Join Date: Jul 2017
Posts: 2
ilovevba is on a distinguished road
Default

Thanks for your reply

The document is just plain text without table/image... so I would say the layout won't change when it is viewed on a different PC with a different machine. Leaving comment is only one of the ways I am thinking to notify users the findings and msgbox could do the job which will not affect the text flow ?

Because the document contains about 100 pages (all text), so I just want to check whether sometimes the first line of any pages is empty, so that I can make amendments to delete that line and make the document to be more tidy.
Reply With Quote
  #4  
Old 07-19-2017, 01:17 AM
gmayor's Avatar
gmayor gmayor is offline How to check whether every first line of each page has word ? Windows 10 How to check whether every first line of each page has word ? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If you format the paragraph settings of the document's styles appropriately and don't use empty paragraphs to add space between paragraphs (Use space before/space after) there won't be an empty paragraph at the top of the page.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Check for a horizontal line NevilleT Word VBA 2 01-06-2016 11:50 PM
check box issue (problem with radio buttons from web page) Word 2013 cQQlgirl Word 6 03-19-2015 07:23 PM
Can you prevent an empty line from appearing in the first line of a page? New Daddy Word 10 11-18-2013 07:01 AM
How to check whether every first line of each page has word ? line and ?object at bottom of page in word 2007 doc btdaniel Word 10 07-23-2012 03:03 AM
How to check whether every first line of each page has word ? Unwanted line across Word 2010 page jwcarrollrn Word 2 01-24-2011 10:52 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft