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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:59:33+00:00 2026-06-15T19:59:33+00:00

I created a table. The table is beginning at the first line of the

  • 0

I created a table. The table is beginning at the first line of the Document. My Problem is that i cant insert a line above the table. Everytime i try to add a Paragraph, the Paragraph gets inserted after the last table. Is there a way to insert the lin above the first table?

To illustrate my Problem:

http://www.techrepublic.com/blog/msoffice/insert-a-line-above-a-word-table-at-the-top-of-the-page/846

My Code so far:

Dim oApp As Word.Application
    Dim oDoc As Word.Document


    oApp = CType(CreateObject("Word.Application"), Word.Application)
    oDoc = oApp.Documents.Add()


    Dim rng As Word.Range = oDoc.Range(0, 0)
    rng.Font.Name = "Verdana"
    rng.Font.Size = 16


    Dim para As Word.Paragraph = oDoc.Paragraphs.Add()
    para.Range.Text = "Factsheet"



    Dim tlb6 As Word.Table = oDoc.Tables.Add(Range:=rng, NumRows:=1, NumColumns:=4)


    Dim CurrentDateTime As Date = Date.Now
    Dim CurrentDate As Date = New Date(CurrentDateTime.Year, CurrentDateTime.Month, CurrentDateTime.Day)

    tlb6.Cell(1, 1).Range.Text = "Date"
    tlb6.Cell(1, 1).Shading.BackgroundPatternColor = Word.WdColor.wdColorGray20
    tlb6.Cell(1, 1).Borders.OutsideLineStyle = 1
    tlb6.Cell(1, 2).Range.Text = CurrentDate
    tlb6.Cell(1, 2).Borders.OutsideLineStyle = 1
    tlb6.Cell(1, 3).Range.Text = "Issued by"
    tlb6.Cell(1, 3).Shading.BackgroundPatternColor = Word.WdColor.wdColorGray20
    tlb6.Cell(1, 3).Borders.OutsideLineStyle = 1
    tlb6.Cell(1, 4).Range.Text = ""
    tlb6.Cell(1, 4).Borders.OutsideLineStyle = 1
  • 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-15T19:59:34+00:00Added an answer on June 15, 2026 at 7:59 pm

    If you’re using Word 2010, this should do the job (although it is ugly and uses Select and ActiveDocument):

    If ActiveDocument.Paragraphs(1).Range.Information(wdWithInTable) = True Then
        tbl6.Rows(1).Cells(1).Range.Collapse direction:=wdLeft
        Selection.SplitTable
    End If
    

    It checks to make sure the first Paragraph object is inside a table, and if it does, it adds a row of text above it.

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

Sidebar

Related Questions

I have created a table in Visual Studio. That table has two columns. First
Hi I created a table for a wiki application that I was doing. It
I'ma having an issue retrieving data from the table that I've created. It displays
I have created table and inserted values as below. create table mytable (id INT,
I have a dynamically created table which in the last <td> there is a
i created a table in the database (mysql),and i write a code for inserting
I created a table like this CREATE TABLE pull_dtl ( source_schema VARCHAR2(4000), source_tablename VARCHAR2(4000),
I created a table without a primary key Like this: private static final String
I created a table then added a foreign key reference to its primary key
I created a table tbl_Candidate , but I forgot to set the primary key

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.