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 8477451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:28:19+00:00 2026-06-10T18:28:19+00:00

I am having trying to set border of word table from Excel VBA. Many

  • 0

I am having trying to set border of word table from Excel VBA. Many sites suggest the following:

wrdTable.Borders(wdBorderTop).LineStyle = wdLineStyleSingle

but I get an error (The requested member of the collection does not exist) while trying it. However, I could bring inner borders using following code:

wrdTable.Borders(xlDiagonalUp).LineStyle = xlContinuous

Similarly I tried:

wrdTable.Borders(xlEdgeTop).LineStyle = xlContinuous

to bring top borders, but I get diagonal lines. How could I apply borders (inner and outside borders) in my word tables? I am using office 2007.

  • 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-06-10T18:28:20+00:00Added an answer on June 10, 2026 at 6:28 pm

    These articles will put you on the right track:

    http://www.shaunakelly.com/word/formatting/border-basics.html

    http://www.shaunakelly.com/word/styles/borders-in-table-styles.html

    Assuming your wrdTable is properly set to the table object in msword’s document you have a few options:

    wrdTable.Borders.Enable = True
    

    Setting this to True set’s the object’s borders to the same line style and line width as the current default border properties for this object.

    Otherwise guidelines are

    • Set the .LineStyle first.
    • Only if .LineStyle is not wdLineStyleNone then
      • set the .LineWidth
      • set the .Color.

    Heres a more detailed version:

    With wrdTable.Borders
        .OutsideLineStyle = wdLineStyleSingle
        .OutsideLineWidth = wdLineWidth075pt
        .OutsideColor = wdDarkRed
    End With
    

    For additional reference on syntax, see this page:

    http://msdn.microsoft.com/en-us/library/office/aa221392(v=office.11).aspx

    (note, I’ve typed this code from my mobile phone, so it is untested)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

iv been having trouble trying to set a listview from a json object from
I'm having hard time trying to set certain cell's value in table. Here is
I need help trying set-up Foreign Keys after having difficulty following Music library MySQL
I'm trying out the following query: SELECT A,B,C FROM table WHERE field LIKE 'query%'
I'm having the following classes. While trying to set the values of the employee
I'm working on a game, but I'm having trouble trying to set the scores
Trying to set up Cancan within an app of mine and having trouble with
I am having a real headache trying to set a node's local position to
I'm trying to set the scroll with jQuery / JavaScript. I'm having trouble figuring
I'm trying to create a Set that contains instances of 'Vertex3<T>'. I'm having a

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.