View Single Post
 
Old 01-04-2017, 07:41 AM
angelic.andy.1964 angelic.andy.1964 is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2017
Posts: 4
angelic.andy.1964 is on a distinguished road
Default

Hi,

I have put in more details below.
How should I declare AlighTxt?

Sub Insert_Seven_Column()

Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, NumRows:=1, Numcolumns:=7)
myTable.Select
Call Format_Table(12, wdAlignParagraphRight)

End Sub

Function Format_Table(fontsize As Single, AlignTxt As Long)

With Selection
.Font.Name = "Arial"
.Font.Size = fontsize
.ParagraphFormat.Alignment = AlighTxt

.MoveDown Unit:=wdLine, count:=1
.TypeParagraph
End With

End Function

Thank you in advance for your time.

Regards
Andy
Reply With Quote