in this code i create some content for my word document:
` ‘ Add a new paragraph to the third cell in the first row of the table for the creator name
Dim newParagraph3 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph3.Range.Text = “creatorName: ” & creatorName
newParagraph3.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
<code> ' Add a new paragraph to the third cell in the first row of the table for the provider name
Dim newParagraph4 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph4.Range.Text = "providerName: " & providerName
newParagraph4.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for the document code value
Dim newParagraph5 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph5.Range.Text = "DucumentCode: " & DucumentCode
newParagraph5.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for theReviewNumber value
Dim newParagraph6 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph6.Range.Text = "ReviewNumber: " & ReviewNumber
newParagraph6.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for the ReviewDate value
Dim newParagraph7 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph7.Range.Text = "ReviewDate: " & ReviewDate
newParagraph7.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Repaginate the document
<code> ' Add a new paragraph to the third cell in the first row of the table for the provider name
Dim newParagraph4 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph4.Range.Text = "providerName: " & providerName
newParagraph4.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for the document code value
Dim newParagraph5 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph5.Range.Text = "DucumentCode: " & DucumentCode
newParagraph5.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for theReviewNumber value
Dim newParagraph6 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph6.Range.Text = "ReviewNumber: " & ReviewNumber
newParagraph6.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for the ReviewDate value
Dim newParagraph7 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph7.Range.Text = "ReviewDate: " & ReviewDate
newParagraph7.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Repaginate the document
doc.Repaginate()`
</code>
' Add a new paragraph to the third cell in the first row of the table for the provider name
Dim newParagraph4 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph4.Range.Text = "providerName: " & providerName
newParagraph4.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for the document code value
Dim newParagraph5 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph5.Range.Text = "DucumentCode: " & DucumentCode
newParagraph5.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for theReviewNumber value
Dim newParagraph6 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph6.Range.Text = "ReviewNumber: " & ReviewNumber
newParagraph6.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Add a new paragraph to the third cell in the first row of the table for the ReviewDate value
Dim newParagraph7 As Word.Paragraph = oTableHeader.Cell(1, 3).Range.Paragraphs.Add()
newParagraph7.Range.Text = "ReviewDate: " & ReviewDate
newParagraph7.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
' Repaginate the document
doc.Repaginate()`
no i want to add newParagraph8 and display automatic creation word page number for every pages
i want to use build in word page number, how can i do that?
I want to show the information of a database in a Word file, the number of pages can vary. And I want the number of pages to be created automatically at the top of the page in the header section