|
批量调整表格宽度
7 M3 P4 {- U9 R o- Sub 调整表格格式()2 P( T+ x7 `, i, I+ ^8 i/ H
- Dim tb As Table% P" U+ ~: a/ C, s+ c! `$ [! C3 c- v
- For Each tb In ThisDocument.Tables()
% ~1 T% \( N; ?8 U' |( ~ - tb.Select$ G6 e$ N* L: u8 j0 l6 R: [
- With Selection.ParagraphFormat
7 h" M2 J! v5 q - '段前间距,单位:磅
' Z0 H5 i! ^7 j8 _! W3 o8 Q - .SpaceBefore = 0* l0 w/ }) \ m& ^
- .SpaceBeforeAuto = False
; a: `% v" K( g$ ] - '段后间距,单位:磅
3 a3 ?; x" `7 h N8 ? - .SpaceAfter = 0
) @2 X7 T- e |! r - .SpaceAfterAuto = False: n9 R, d4 E$ o
- '行间距,单倍行距8 G0 P& \3 ^' ]1 [/ D
- .LineSpacingRule = wdLineSpaceSingle3 q0 Y2 f! k: W$ f8 Z
- '左缩进,单位:字符6 _( h8 h" E: _9 X3 v0 \
- .CharacterUnitLeftIndent = 02 l# ^- F; q& e8 R2 w" f( ^
- '右缩进,单位:字符 w/ o* h( P, C2 G7 `
- .CharacterUnitRightIndent = 0
3 e: n( v* n; U: _7 [ - '首行缩进,单位:字符: W+ w' S7 U# t: ^* ]) F3 f
- .CharacterUnitFirstLineIndent = 0% Z3 {- ]1 S& ?) a4 E, q
- End With
( z9 D% n" U& k8 u- m3 r# m - '根据窗口调整表格宽度/ c6 E1 l" e6 y7 e( O6 {' \
- tb.AutoFitBehavior (wdAutoFitWindow)
: F" Q/ L* X2 T/ ?# x1 V5 K - Next
8 H3 S7 A2 Z* f" K9 v+ X) e - End Sub1 d8 g7 @3 q8 E6 K" M
复制代码 & p5 Z$ l/ _/ w
, ^& r5 n' C1 T) r i$ `; x |
|