none
WORD Does not show spacing before paragraph at top of page RRS feed

  • Question

  • I have a document with 4 sections. In the last section each subheading uses a style which adds 24pt spacing before the paragraph and 12pts after.  On the first page the 24pt before the paragraph is visible.  But on each succeeding page where the subheading is at the top the 24pt before the paragraph is not visible even though using the same style.  Is there something that can be done programmatically to find the problem or at least change the spacing when this happens?
    • Moved by Jie Bao Wednesday, July 18, 2012 9:30 AM (From:Word for Developers)
    Tuesday, July 17, 2012 5:03 PM

All replies

  • Hi kaykame

    The forums on MSDN target programming issues. Your question is an end-user question. You'll find many more people who can help you with end-user issues on the Answers site:

    http://answers.microsoft.com/en-us/office/forum/word

    Unfortunately, we're not able to move messages from MSDN to Answers, so you'll have to repost.


    Cindy Meister, VSTO/Word MVP

    Tuesday, July 17, 2012 5:39 PM
  • Unless you're familiar with programming using the Word object model, it really would be easiest to post on Answers as Cindy suggests. There's no diagnostic code someone can show you; to find the cause of the problem programmatically would be to make the task harder.

    Have you  checked whether the 'add spacing before paragraph' and 'add spacing after paragraph' options are set equally in all sections? They're on the home tab. Possibly they could account for the differences you're seeing.


    Tuesday, July 17, 2012 10:15 PM
  • I have resolved the issue and can also resolve this programmatically.  It has to do with paragraph spacing after a page break both soft and hard.  Unless I set the line spacing on the second page and following pages to 36pts (After 12pts + Before 24pts) the 24pts spacing before the paragraph does not show.  Since I am adding page breaks programmatically my code may also have to include adding additional line spacing for the heading if it is on the first line of the page.  Possibly a bug?????

    • Edited by kaykayme Thursday, July 19, 2012 12:24 PM
    Thursday, July 19, 2012 12:05 PM