View Single Post
 
Old 03-05-2023, 09:31 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
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

Left cell? Your question (and code) didn't mention tables. You would need to supply a sample document so that we can see what you are working with.
The page number is simpler
Code:
 Do While .Execute
            oRng.MoveEndUntil Chr(13)
            oRng.End = oRng.End + 1
            oRng.MoveEndUntil Chr(13)

            Set oEnd = oTarget.Range
            oEnd.Collapse 0
            oEnd.FormattedText = oRng.FormattedText
            oEnd.Collapse 0
            oEnd.Text = Chr(32) & "Page " & oRng.Information(wdActiveEndPageNumber)
            oEnd.Collapse 0
            oEnd.InsertParagraphAfter
            oRng.Collapse 0
        Loop
__________________
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