nonlinearly
asked on
Word 2010 set specific text to 4rd line break in every page using VBA
Hi,
I have a word with 5.000 pages and every page is a different section... I need in 4rd line break (that already exist and has nothing) on each page to set a sequentially number... I think that I will not avoid VBA to do this but how?
Thanks
I have a word with 5.000 pages and every page is a different section... I need in 4rd line break (that already exist and has nothing) on each page to set a sequentially number... I think that I will not avoid VBA to do this but how?
Thanks
Can you clarify the "4rd line break" part? You may be able to do this if you have a pattern that can be used with a wildcard search within the Find dialog. For the sequential numbering, I would recommend using a SEQ field code -- and that could be put into the document using Replace if a Find pattern can be used.
Can you post a small representative sample of the document?
Can you post a small representative sample of the document?
>> I need in 4rd line break (that already exist and has nothing) on each page to set a sequentially number...
Not nearly clear enough to help you answer your question!
Do you want to insert a new paragraph (^p) break or a new line (^l) on each page?
Do you want to insert it at a specific location on the page, or is the location not important?
What dou you mean by set a sequentially number? Does the number already exist? Is it a page number?
Not nearly clear enough to help you answer your question!
Do you want to insert a new paragraph (^p) break or a new line (^l) on each page?
Do you want to insert it at a specific location on the page, or is the location not important?
What dou you mean by set a sequentially number? Does the number already exist? Is it a page number?
ASKER
GrahamSkan,
it works.. but it looses the right adjustment-alignment that has and converted to left...
it works.. but it looses the right adjustment-alignment that has and converted to left...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
GrahamSkan,
If I want pages and not sections?
If I want pages and not sections?
That is more difficult. The Page object does not return the range or its text, because what is on the page depends on the pagination which is done dynamically.
If there were manual page breaks, however, we could look for the fourth paragraph after each one.
If there were manual page breaks, however, we could look for the fourth paragraph after each one.
I assume that you need the fourth, currently empty, paragraph in each section of your document to contain a sequential number.
This should do that:
Open in new window