Skip to content
TheChatArchiveThe Chat Archive
chatgpt-4o-latest-20250326· OpenAIHugging Face LMArena Human Preference 140K

ms word: add borders to both sides of line numbers

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-3-5-haiku-20241022’s answer.
  1. User

    ms word: add borders to both sides of line numbers

  2. Assistant

    In Microsoft Word, line numbers typically appear on the left side of the document and cannot have borders on both sides via a direct setting in the Line Numbers feature. However, you can simulate borders on both sides of line numbers using a workaround.

    Here's a step-by-step method to achieve this effect:


    ✅ Method: Use a Text Box to Simulate Line Numbers with Borders

    This method involves manually simulating line numbers in a narrow text box with borders on both sides.

    Step 1: Set up a Two-Column Layout

    1. Open your Word document.
    2. Go to the Layout or Page Layout tab.
    3. Click on Columns > Choose More Columns.
    4. Choose Two columns:
      • Set the Spacing between columns to something small, like 0.3".
      • Set the Width of the first column very narrow (e.g., 0.5") to simulate a line number space.
    5. Click OK.

    Step 2: Add Line Numbers Manually (or Copy-Paste)

    1. In the narrow column, type the line numbers manually (1, 2, 3, ..., or use Excel to generate them and paste into Word).
    2. Align them to the top so they line up with your corresponding text.

    Step 3: Add Borders to Line Number Column

    1. Highlight all the line numbers.
    2. Go to the Home tab.
    3. Click on the Borders button (in the Paragraph group).
    4. Choose Borders and Shading.
    5. Under Borders, select both Left and Right borders (make sure Top and Bottom are unchecked).
    6. Choose the style, color, and width you want.
    7. Click OK.

    🔁 Alternative (for advanced users): Use a Table

    If you want to align line numbers and text more precisely:

    1. Insert a 2-column table.
    2. In column one (narrow), type your line numbers.
    3. In column two (wide), paste or type your content.
    4. Add borders to column one:
      • Right-click → Table Properties → Borders & Shading → Apply borders to both sides of the left column.

    ⚠️ Note: Word does not natively support decorative borders around or beside automatically generated line numbers. The above methods are workarounds for visual formatting.


    Would you like help automating the numbering in Excel or Word?

  3. User

    there is no format button in the line numbers dialog box

  4. Assistant

    You're absolutely right — in Microsoft Word, the Line Numbers dialog box does not have a "Format" button. It offers very limited formatting options (such as start number, increment, and continuous vs. restart each page/section), and does not allow you to style or apply borders directly to line numbers.

    ❌ Limitations:

    • Line numbers are a system feature.
      • They're displayed in the margin.
      • Not selectable or stylable with borders, fonts, or colors directly.
    • You cannot apply borders, change fonts, or adjust the spacing using traditional formatting controls like "Borders and Shading" or "Paragraph" options.

    ✅ What You Can Do (Workarounds)

    If your goal is to visually improve line numbers — for example, adding borders on both sides or styling them — here are your effective options:


    🔁 Workaround 1: Simulate Line Numbers Using a Table (Recommended)

    You can simulate line numbers with a 2-column table, giving you full control over formatting, borders, spacing, etc.

    🛠 Steps:

    1. Insert a 2-column table:
      • Go to Insert tab > Table > 2 columns and as many rows as needed.
    2. In the left column, fill in your line numbers (1, 2, 3...).
      • You can auto-generate in Excel and copy-paste them into Word.
    3. In the right column, paste/type your actual document text.
    4. Adjust the width of the left column to make it narrow.
    5. Add borders to the left column:
      • Select the left column.
      • Right-click > Table Properties > Borders and Shading.
      • Choose to add Left and Right borders.
      • Click OK.

    🔁 Workaround 2: Use a Text Box for Line Numbers

    Create a floating textbox along the margin with borders and manually enter numbers.

    🛠 Steps:

    1. Go to Insert > Text Box > Draw a narrow text box along the left margin.
    2. Type the line numbers manually or copy from Excel.
    3. Add borders:
      • Select the textbox.
      • Right-click > Format Shape > Line > Choose borders or apply fill/background.
    4. Align the numbers with the main text as needed.

    🔎 This is helpful for visual presentation but not automatic. Text boxes don't auto-update if your text shifts.


    ✅ Summary

    GoalSupported by Word Natively?Workaround Available?
    Add borders around automatic line numbers❌ No✅ Use tables or text boxes
    Format font/style/color of line numbers❌ No✅ Simulate with a column/table
    Automatically update numbers with text✅ Yes (default line number system)❌ Not with workarounds

    Would you like a sample Word document (in .docx format) or VBA code to automate the table generation with bordered line numbers?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.