Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3721520
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:35:05+00:00 2026-05-19T05:35:05+00:00

I am having trouble setting the line spacing in Word 2007. Word 2007 defaults

  • 0

I am having trouble setting the line spacing in Word 2007. Word 2007 defaults to double spacing or to having extra space between lines. Previously, I have always used something similar to this with success (In C#):

//No spacing when using Word version > 2003
//Word 2003 = "11.0"
//Word 2007 = "12.0"
Word.Application appVersion = new Word.Application();
string sVersion = appVersion.Version.ToString();
if (sVersion != "11.0")
{
    object noSpacingStyle = "No Spacing";
    oWord.ActiveWindow.Selection.set_Style(ref noSpacingStyle);
}

But, this is breaking when trying to apply it under some regional/cultural settings, such as Italian and German. I believe this is because “No Spacing” needs to be in the target language, instead of hardcoded as English. So, I am trying to figure out a way to apply this same change in a more portable way.

I’ve tried sifting through the various enumerations, such as “WdBuiltinStyle,” but can’t seem to find one that accomplishes the same thing as “No Spacing.”

Does anyone here know how to accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T05:35:06+00:00Added an answer on May 19, 2026 at 5:35 am

    What about using

    Selection.ParagraphFormat.LineSpacingRule = WdLineSpacing.wdLineSpaceSingle;
    

    Your code does not set the line spacing, it sets a style that has certain line spacing applied to it.

    Quoting from the person asked how they solved it, since this is the accepted answer:

    As Joey suggested, the solution is to use Word’s built in styles. I
    resolved this by applying the following to my Word._Application
    object:

    oWord.ActiveWindow.Selection.ParagraphFormat.LineSpacingRule = Word.WdLineSpacing.wdLineSpaceSingle;
    oWord.ActiveWindow.Selection.ParagraphFormat.SpaceAfter = 0.0F;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble setting the command-line arguments in Eclipse. I've searched around the Internet
Java newbie here, I'm having trouble setting a new line in this code: String
I am having trouble setting this up for multiple divs. I have it here
having a lot of trouble setting up polymorphic. I have Comments which works fine,
I am having trouble setting up landscape mode in my application. I have a
I have been having trouble setting a box shadow on the left side of
I am having trouble setting my ContentProperty to Text. The error I am given
I'm having trouble setting up my svn. I used apt-get install subversion to install
I'm having trouble setting the path to a DLL that is not in the
I am having trouble setting the XHR responseType to json. It works fine if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.