VBA 实现自动设置页面布局和一页八张图片

624次阅读
没有评论
Sub 设置页面横向边距为 0()
'' 设置页面横向边距为 0 宏' ' 设置活动文档页面方向为横向
    ActiveDocument.PageSetup.Orientation = wdOrientLandscape
    
    ' 设置页边距为 0
    With ActiveDocument.PageSetup
        .TopMargin = 0
        .BottomMargin = 0
        .LeftMargin = 0
        .RightMargin = 0
    End With

End Sub
Sub 一页八张 ()
'' 一页八张 宏'
'
Dim i As Integer

    For i = 1 To ActiveDocument.InlineShapes.Count
    
    With ActiveDocument.InlineShapes(i)
    
    .Height = 345
    
    .Width = 185
    
    .LockAspectRatio = msoFalse
    
    .Borders(wdBorderTop).LineStyle = wdLineStyleSingle
    
    .Borders(wdBorderTop).LineWidth = wdLineWidth050pt
    
    .Borders(wdBorderTop).Color = wdColorAutomatic
    
    End With
    
    Next i




End Sub
正文完
 0
刘磊博客
版权声明:本站原创文章,由 刘磊博客 于2024-02-16发表,共计511字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。