我需要按.doc
以下顺序将三个对象放在我的身上:
One Picutre;
Some Text;
One Table;
我最近学会了如何将图像放置在我想要的位置(文档顶部)。
但是现在,表格正在文本中间,我该如何设置文本,Position Absolute
然后是Table
下面的text
?!
我目前的代码:
Private Sub Command1_Click()
Dim Word_App As Word.Application
Dim Word_Doc As Word.Document
Dim Word_Table As Word.Table
Dim Word_Range As Word.Range
Dim iCount As Integer
'Insert the image
Word_App.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Word_App.Selection.InlineShapes.AddPicture FileName:="C:\p\53.jpg", SaveWithDocument:=True
Word_App.Selection.TypeParagraph
With Word_App
'Here I place some text
End With
'Insert Table
Set Word_Table = Word_Doc.Tables.Add(Range:=Word_Doc.Range(Start:=20, End:=20), NumRows:=3, NumColumns:=4, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed)
Word_Doc.SaveAs FileName:="C:\p\TestandoPicture"
Set Word_Table = Nothing
Set Word_App = Nothing
Set Word_Doc = Nothing
End Sub
Notice that:
在我的代码中,我输入了表格的位置Start:=20, End:=20
,它位于字符的第 20 位......但我想把它放在文本下面......这是最好的方法吗?