Thread: [Solved] Setting page numbers
View Single Post
 
Old 11-18-2024, 05:07 AM
Bikram Bikram is offline Windows 10 Office 2007
Advanced Beginner
 
Join Date: Jul 2021
Location: Nepal
Posts: 97
Bikram is on a distinguished road
Default

Thank you for the response, Macropod. I am very grateful. The code you provided inserts the page number, but the problem still exists, and it seems like (Hard-coding it to take as little space as possible) is the only option for now.

For now, I am using
Code:
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    With Selection
        .font.Size = 1
        .font.spacing = 0
        .ParagraphFormat.spaceBefore = 0
        .ParagraphFormat.spaceAfter = 0
        .ParagraphFormat.LineSpacingRule = wdLineSpaceMultiple
        .ParagraphFormat.lineSpacing = LinesToPoints(1)
    End With
Reply With Quote