استحدم هذا الكود لادراج و محاذاة رقم الصفحة بالكود ولكن المحاذاة خاطئة
كيف اجعل المحاذاة في الوسط
Dim oWord As New Microsoft.Office.Interop.Word.Application
Dim oDoc As Microsoft.Office.Interop.Word.Document
oDoc = oWord.Documents.Open(Application.StartupPath & "\print\GGGGG.doc")
oDoc.Activate()
'oWord.ActiveDocument.Bookmarks("GG").Range.Text = (Me.TextBox1.Text)
With oWord.ActiveDocument.Sections(1)
.Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter
.Headers(Word.WdHeaderFooterIndex.wdHeaderFooterEv enPages).PageNumbers.Add()
End With
oWord.Selection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter
'oWord.ActiveDocument.footerParagraph.Format.Horiz ontalAlignment = oWord.ActiveDocument.HorizontalAlignment.center
oWord.Visible = True