![]() |
|
#1
|
|||
|
|||
![]()
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. |
#2
|
||||
|
||||
![]()
'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 |
#3
|
|||
|
|||
![]()
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. |
#4
|
||||
|
||||
![]()
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 |
![]() |
|
![]() |
||||
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 |
![]() |
btdaniel | Word | 10 | 07-23-2012 03:03 AM |
![]() |
jwcarrollrn | Word | 2 | 01-24-2011 10:52 PM |