Click here to Skip to main content
15,883,710 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get entire access database column to fit in one bookmark in ms-word 2007 using vb.net?
Posted

1 solution

please give time to answer this, i really need this for my thesis...tnx

this is my code:

VB
Public Sub PRINTTORGRADES()
        Data.con = New OleDbConnection
        Dim cmd As New OleDbCommand(Data.PrintTORGrades(CurrentStudent), Data.con)
        Data.OpenConn()
        Dim dr As OleDbDataReader
        dr = cmd.ExecuteReader()

        If dr.HasRows Then
            dr.Read()

            Dim Grades As String
            Grades = dr("Name")
            oDoc.Bookmarks.Item("FirstYear1").Range.Text = Grades

        End If
        dr.Close()
    End Sub


this only gives the bookmark the first record not the entire column.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900