当前位置:编程学习 > VB >>

关于WORD宏调用VB的问题,请侠帮忙!

我在WORD的宏里编写了一段VB,调用数据库Sql的数据信息,原来的模板的样子是有两个照片模板,可以调用sql里的图片,每个照片下面都有注释文字,现在我想把它缩小成四张并排的照片模板,但是注释文字却不在原来的图片下面,位置改变了,请问是什么原因,代码如下:

Sub TwoStillsPerRowTable()
'
' TwoStillsPerRowTable Macro
' Macro recorded 03/11/99 by Michael Mulleady
'
    ActiveDocument.Tables.Add range:=Selection.range, NumRows:=2, NumColumns:= _
        4
    With Selection.Tables(1)
        .Columns.Width = InchesToPoints(1.735)
        .AutoFormat Format:=wdTableFormatGrid1, ApplyBorders:=False, _
            ApplyShading:=True, ApplyFont:=True, ApplyColor:=True, _
            ApplyHeadingRows:=True, ApplyLastRow:=False, ApplyFirstColumn:=True, _
             ApplyLastColumn:=False, AutoFit:=False
    End With
    PreventTableBreakAcrossPages
    Selection.MoveLeft unit:=wdCharacter, Count:=1
End Sub
Sub OneStillPerRowTable()
'
' OneStillPerRowTable Macro
' Macro recorded 03/11/99 by Michael Mulleady
    
    ActiveDocument.Tables.Add range:=Selection.range, NumRows:=2, NumColumns:= _
        4
    With Selection.Tables(1)
        .Columns.Width = InchesToPoints(1.735)
        .AutoFormat Format:=wdTableFormatGrid1, ApplyBorders:=False, _
            ApplyShading:=True, ApplyFont:=True, ApplyColor:=True, _
            ApplyHeadingRows:=True, ApplyLastRow:=False, ApplyFirstColumn:=True, _
             ApplyLastColumn:=False, AutoFit:=False
    End With
    PreventTableBreakAcrossPages
    Selection.MoveLeft unit:=wdCharacter, Count:=1
End Sub


我的QQ:156404301 有问题加我啊 呵呵 --------------------编程问答-------------------- 友情Up......
--------------------编程问答-------------------- 那些注释文字是在图片里的吗?
补充:VB ,  VBA
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,