dimanche 19 avril 2015

Update cells in tables in header in word document using vb.net


Vote count:

0




I have opened a word document in vb.net. This word document has table in header and in the document. I tried updating a table in document it works fine. But not able to succeed in updating table which is in header. Need help to know the syntax to update the table in header.



'update table
Dim r As Integer, c As Integer
oTable = oDoc.Tables(1)
oTable.Range.ParagraphFormat.SpaceAfter = 6
For r = 1 To 1
For c = 1 To 4
oTable.Cell(r, c).Range.Text = "r" & r & "c" & c
Next
Next

'update table in header
Dim footerRange As Word.Range = oDoc.Sections(1).Headers(Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage).Range.Tables
footerRange.Cells(1).Range.Text = "RR"


Thanks and Regards Siva.P



asked 17 secs ago







Update cells in tables in header in word document using vb.net

Aucun commentaire:

Enregistrer un commentaire