|
继续
End If
7 M5 v, W' u9 t3 C4 n3 L G, T6 r8 X- e- ?
If y = 1 Then ; j3 q4 S' ]" i! g9 P: r
; F( c+ J. `( T) z; u9 r If ma.Borders(xlEdgeLeft).LineStyle
; i7 o4 A, Z1 Q0 _" l
7 p( V' K: V- r/ w2 [ h5 z6 \ < > xlNone Then 8 ~* k4 i' t0 n
! x5 x! K) u, v( b
ptArray(0) = xpoint
+ h' q( P I0 \
1 U, _% T8 @7 b4 w( w) c+ C ‘第四点坐标(数组下标 0 and 1)
2 s7 u0 P7 W0 v0 C& Z' S. }: u" _: V$ r9 a4 }* h, ]9 Z
ptArray(1) = ypoint - yh
0 A: f: g# l6 n' n8 i
' s/ C8 k4 F, {. x0 s ptArray(2) = xpoint
8 e3 A6 a: ]- j" u
3 l3 |3 X) i# ]7 l8 m& M ‘第一点坐标(数组下标 2 and 3)
' J3 q z# L5 W4 U
7 P4 B% Q q# X1 A) j: ^* ~ ptArray(3) = ypoint
6 O) [" @1 M# n
! K9 c# w+ l) a, H End If . D0 u* W! _. A2 c" Z
1 g: a- v2 h- q. C+ S Lineweight lwployobj, ma.Borders(xlEdgeLeft).Weight
% p0 i" P) {5 Y d& U/ n* W- w5 h( E; Y- M( M
End If
) M+ F$ Z4 w5 R: C8 f* p& w. \: z+ Q6 a7 ^) |
If ma.Borders(xlEdgeRight).LineStyle
6 N: _: R( `' d- M. Z4 R+ t+ h
1 W, c( c% g A# ?9 ~3 O < > xlNone Then
2 D; Q5 }# @% v
* T% z( U% L& g3 j- g ptArray(0) = xpoint + xh
6 b$ X8 I6 U8 k0 l7 R" e# b4 i& x
‘第二点坐标(数组下标 0 and 1) + k) I1 ?$ X* _
) ~3 c6 K; f2 z5 p
ptArray(1) = ypoint
) V ~" P5 p1 c& }' E- R; b3 p9 H: A/ E3 |6 J" L7 ]
ptArray(2) = xpoint + xh 0 p! s4 f2 o; k T5 q D) c
: g& {/ B& P7 V' [, `$ z$ W8 h ‘第三点坐标(数组下标 2 and 3)
) A3 m: B* d* \) p8 D
: W" c; ^' Q3 @2 G% ` ptArray(3) = ypoint – yh
* Q& {& b3 Q: R; J, v! [& R7 b3 A7 M7 X3 n g# p' o/ M
Lineweight lwployobj, , E0 u, q8 O0 g% F2 p$ U& ?8 N) I8 y
" `- U- O2 Z2 X/ C
ma.Borders(xlEdgeRight).Weight
9 c& i' r6 B9 x/ e* |! e9 o+ n4 R$ X9 \% a1 s7 @
End If
G6 r, x* W( r
, D; j. d0 X) M% l% X; k Set lwployobj = moSpace.AddLightWeightPolyline(ptArray)
0 U* Q2 l! {- l" h( h( t
& C6 K; p' o+ f. ?2 O, N) R ‘在AutoCAD文件里画线 # z5 m5 R" d, m' k- v4 d) D
. i( l# x5 T/ w' I
With lwployobj
) T3 Z+ b, m2 p, m V% O7 M, b1 m2 I$ z. S$ ~9 h) n" U& [
.Layer = newlayer.name ‘指定lwployobj所在图层 # j! Z; E4 c; u+ L+ q$ s
8 C: ]8 F* W/ k% Q+ @ .Color = acBlue ‘指定lwployobj的颜色
3 |) ]/ j& Q' e4 R7 _! _
& J+ ]* |5 Z& n3 T End With & |7 g0 K) b) u4 c& W& o+ o
) \7 y/ u' J g8 m" [ Lwployobj.Update
# v! |& D% f6 n8 j0 J( O6 r g7 g+ [" [
Next y
' _# h# q+ z) B( P1 T E6 B) X8 U3 t A n+ i1 X8 r( j! T
Next x
3 Z" Z# g$ t3 k5 a, v/ O9 r5 @- u& L; M" h. w+ m( Q3 J
End Sub ; l+ E- Z1 F" g! t6 M
3 T+ g7 b9 R' H z9 ]/ q4 [2 C: v* X& | ‘下面程序控制线条粗细 3 _8 d* `+ I8 s* O5 a- s) \
" R0 M. h+ p3 v) v
Sub Lineweight(ByVal line As Object, u As Integer) 8 ~9 c7 W$ v5 k9 q# x
7 P+ O! |& P# ~ Select Case u
1 j8 \+ C$ \- B( E& c2 V" u( H2 W8 i; ^- T. R K9 j6 I
Case 1
. _* D; f! }+ v) H; h
0 ?1 l4 W! N# S3 k4 E# s- L Call line.SetWidth(0, 0.1, 0.1)
9 Q# B# z$ f3 |( p! p* B& x3 Y+ F: W$ j6 ^+ e# @3 e/ p4 M- e
Case 2
% N3 D4 D1 B! B+ r- s* T& q! @
% `/ }! L# ^- w: M7 V- D Call line.SetWidth(0, 0.3, 0.3) / R+ `. P2 _- C9 j: J% e6 X! g6 R
; m7 c5 m) G3 L! [( }$ r6 W, ?1 C
Case -4138 - f" ^- Z8 t$ Y$ N
' A+ G% D; O. w @: {2 O. d
Call line.SetWidth(0, 0.5, 0.5) 1 T$ j; o8 q5 T0 g- h0 l
1 ~2 L6 S" h% Z/ {: J9 K Case 4 ; K% T" Q3 X' `$ o7 O
7 D: ?5 h0 i2 g! c& J Call line.SetWidth(0, 1, 1)
, {7 x ^9 ]0 j
! s6 d3 N2 _4 w X e Case Else
5 i4 E: P }: w8 ^& n0 Q. ]* W, W; x( _! d9 d$ q
Call line.SetWidth(0, 0.1, 0.1) " V9 M/ H s/ r% }0 E0 `
$ U/ R. J4 q; h7 t% `6 n2 ? End Select 5 W. [, X* _3 n4 g3 @
" U+ R, x1 l! e& l% v( } End Sub
& B) P& Y1 N: r' Q
9 \- t$ }+ m& T% C7 ? ‘下面程序完成列号转换 ) \2 t8 b: ]+ e9 `
8 Y6 V, @. j% a9 G+ g0 t Function zh(pp As Integer) As String ; I: E2 G0 T7 {: ` C
: H- p1 `) y! I/ G. l If pp < 26 Then $ t+ v; W% z0 }7 |+ j
; T8 o5 N/ l( x zh = Chr(64 + pp) ) X: f% n: I3 a3 B3 B: Y+ q3 |8 a
7 t' O8 U' f5 H& q- u% F; Y& o Else
" G) P/ P/ s8 d. O2 a
3 ^3 ^9 k6 P$ c: }( _; D zh = Chr(64 + Int(pp / 26)) + Chr(64 + pp Mod 26) 8 S; R. {# {8 m/ t- C
. C" \, C1 i1 { End If ! z4 C! f/ Y) Y; ` C6 r, A1 e
- ]% @ p7 e. Y) a' D& x End Function 8 K, H; {0 F! k6 z+ T
9 }5 M- ?/ n6 e# e
3、表格文字转换 - t$ \. ^: j" s; U! B. o
# l% b0 D0 h0 [& l& G2 U9 O 表格文字转换包括表格文字本身转换和表格文字在表格中位置的转换两个部分。 ! ~2 D, c# w1 T
3 ]1 s& m; s! q, B. `, p
在AutoCAD中,文字标注的形式有多种,与Microsoft Excel 单元格区域多行文本内容相对应的是多行文本命令。AutoCAD提供的VBA添加多行文本的命令语句是:
$ T! a, G1 g% NRetVal = object.AddMText(InsertionPoint, Width, Text) , g. {/ V4 I8 T/ ^) J- {% X* I
% D/ U" R/ i* J, f* }8 L5 M2 W- o 通过修改RetVal的属性可以控制表格文字在表格中的位置。 8 s! J9 Q: s, l& y5 L8 ^
4 X8 ^& ?1 `# M& Y. C- Q
(1).表格文字本身的转换
& e& G; A* ]. k* X) Y: S# |! X8 G% M; d# Z7 T/ D) U
分析AddMText命令可以得出:表格文字所在位置、文字内容宽度,文字内容,均可通过此命令来添加。然而表格文字字体,大小,下划线、上下脚标,倾斜,加粗等却不能。一般的方法是采用修改字体形文件的方法来实现,方法烦琐,不便于实现,而且仅对修改过形文件的字体有效。况且当同一文字块内的不同文字的字体,大小,下划线、上下脚标,倾斜,加粗不同时,使用修改字体形文件的方法也无法实现。本文介绍一种直接利用Mtext命令提供的方法进行转换。 9 u/ h8 Q; O: |! b+ o1 J6 p# d
3 w0 A2 r3 D3 _" d4 j/ z4 P 在AddMText命令中,影响文字内容和文字属性的参数Text。在具体文字前加上一定的控制符号可以控制文字的文字属性,具体控制符号可以参阅AutoCAD帮助文件。例如,{\F宋体;\Q18;\W1.2;ABCDEFG}把“ABCDEFG”设置成宋体、向右倾斜18度,每个字的宽度是正常宽度1.2倍。 % L: v' E; F$ L% Y: N7 b
# j; G: n1 [* j. G6 B
本程序具体采用的方法是:读取Microsoft Excel文件某一单元格区域里的某第j个字符属性(字体,大小,下划线、上、下脚标,倾斜,加粗),读取Microsoft Excel文件某一单元格区域里的某第j+1个字符属性,如果与第j个字符相同,则二者采用同样的控制符号;若不同,则从第j+1个字符开始,重复前面的工作。
Y/ v7 H7 M$ T: O s) X! Y1 U7 @% F$ {& B: N; ]
Sub wz ( )
1 `7 a' p j' G1 F# w( l( U( R% U: Q8 h0 v
Char = RTrim(Left(c.Characters.Caption, 256))
4 n4 f% T/ F. `7 y) I- f# v
4 K( T1 M: W' E. `+ v; h% |: \ If Char < > Empty Then
& l$ y' D9 u8 z# Z& L2 |2 W; d5 S: v, T, ]0 `
textStr = ""
( u% c8 O/ K% S
) P4 j' W7 R9 _5 Y5 g1 Z! T6 Z For j = 1 To Len(Char)
4 B9 f/ Z& Y+ E/ L
& h9 V* N& u6 j' M7 H$ `* b2 u( O If c.Characters(j, 1).Font.Underline = ! s8 h0 ^2 ]3 u$ S! g+ L$ L* ~
8 _' ]; ^ J0 _+ W) p xlUnderlineStyleNone Then 6 x1 [( i% ] a! Y( N; b8 G
& d: T( @) f/ c1 u
cpt = c.Characters(j, 1).Caption
6 e) F' i2 R/ k- f* S6 f* d* A$ n8 R
sonstr = ForeFontStr(c, j)
8 e: r) `1 U4 ~' d" e! `, ?+ c% [* e# z2 I
tempstr = "" 4 J5 H! y/ |6 {9 w' e: W
$ y9 C& ~+ l1 S: u9 n7 k# e3 Y# F0 ?
Do While j + 1 < = Len(Char) 3 }$ _% O5 U# u( Y
* H* D4 K `6 f2 m
sonstr1 = ForeFontStr(c, j + 1) : E) L# s2 t/ @0 [. t+ C9 X
5 |( b5 Y# u) W z3 ?# c
If sonstr1 = sonstr Then
# m+ M- `' L& [
( |8 R9 P) e4 S: O0 Z j = j + 1
5 Z2 `. b' E' d3 h( F: U2 n0 Z9 {
tempstr = tempstr + c.Characters(j,
% W4 g; e& g+ Y+ n( W8 O$ @- o; t( U3 n0 l6 G# W. U
1).Caption
2 P- [: I- D$ m* A3 y8 ~2 U1 [* q& F: I
Else
; k4 o; H8 E* ]6 z3 t* d/ i4 L ^4 U3 h% J- Q
Exit Do
; S3 t+ q7 f) S+ H
% Q7 t3 }2 X5 g End If
: {! T }2 n6 n; I0 k( T0 t9 z# ?2 A& ~: [$ g
Loop
$ ~, a: G! O, V! }& \. Y1 g, x
' M8 ^- J! S% Q- b textStr = textStr + "{" + sonstr + cpt
/ |% P- g6 ~7 Z- ~5 y/ {6 L4 S+ d
2 z! k/ O: a) L/ v/ i% W V0 t- D6 [ + tempstr + "}" " G& H4 n' {/ P, b5 r7 X
! P8 E$ s( K* G0 p# f! @/ I% I Else 1 i5 A, P; \- T' z7 _7 u& ?( L5 [) i [
5 h1 j5 Z6 A" j+ r. \- ? cpt = c.Characters(j, 1).Caption
- Z7 _- A! `2 o2 L( C) ?3 I; `5 }1 l% i; K4 j- @( L
sonstr = ForeFontStr(c, j) $ m2 d5 U c) O+ E2 F* y
$ r% j. D; c) p: ]( n
tempstr = ""
" V. i7 U5 m" p6 o2 t
' N3 I5 `/ d' }9 n3 w) B/ O; Q Do While j + 1 < = Len(Char)
$ w. t) P5 x) i; c0 T( Q
# x. a2 J, t$ ^8 K1 J sonstr1 = ForeFontStr(c, j + 1)
: N" k. B! T* A& M( l5 _2 f' {! B. g" F
If sonstr1 = sonstr Then
7 `' H' I: m+ H1 j1 e2 V( O3 e U) j+ t& `3 o0 ~
j = j + 1 . w8 A' r9 x1 }2 s: n) o9 ]3 M
9 \" [+ b3 _ D6 t/ K( } tempstr = tempstr + c.Characters(j,
0 q' O2 w- Q/ O' U3 {" T4 T" k5 R% {7 @$ J' ~8 u! c
1).Caption ) r: ]/ [3 K- g" ]
+ O/ j- z$ l! Z5 l& o" r; |/ a Else
) N: }" O6 \8 g) @, ~2 h- f* _4 U
Exit Do 6 B9 ^- E& ~9 x+ v. F
" l- W( z: b9 ? j# H
End If
0 M: x! m! `5 ]6 A7 F: C$ ?( V y0 w7 O9 n
Loop % V$ j+ g" E. k& ]# F
' Q, \' c: |( P: E, m% `! P5 P+ M textStr = textStr + "{\L" + " k( Y+ A% f+ c
' ~9 y% A' V0 ] sonstr + cpt + tempstr + "\l}" 3 W/ [' c# r/ z. Y% D% H
4 w% [/ i( e" ^# Y' D
End If ?$ V: U4 d) a3 G9 b' C6 s4 @
Next j ; d7 p4 F; g7 A0 E* E9 q5 j
! S9 b- ]3 Z; ]% D$ }
End If
3 I4 R9 W) D. v# b- G* r* `
1 S3 w3 C B1 l9 n f( X7 U End Sub 0 [ ?" j8 Q0 J( R( T5 j2 h& V
! @+ l0 {* Z2 x* [6 `
‘下面函数控制字体本身属性
0 @6 j3 m' x( ?1 U: t" a2 o
e w6 R3 u4 W) _! @, q* k1 `6 i Function ForeFontStr(m As Range, u As Integer) As String . P+ Z6 a! ?; O- p Y* R! I
7 j. R' ~* K0 y# X b" E3 d0 I
a1 = "\F" + m.Characters(u, 1).Font.Name + ";" ‘字体
* D- `3 D% k0 n" Y$ H+ D
+ j" q, e# Z# [9 D: j7 { a2 = IIf(m.Characters(u, 1).Font.Superscript =
5 h. Y' z- }5 b
3 @+ U, Y; q. [ True, "\H0.33x;\A2;", "") '上脚标
1 E& f9 p- ~) ]( g4 R5 }; X$ [( x. k, H4 I
a3 = IIf(m.Characters(u, 1).Font.Subscript = ; x w! v& |0 Q
2 f$ B' s n3 h, K True, "\H0.33x;\A0;", "") '下脚标 6 v2 b- G8 q0 f. q
+ d( r& A; R7 o5 l5 n
a4 = IIf(m.Characters(u, 1).Font.FontStyle = 4 J, V6 c, g' _5 }! ?, Y
$ P1 j: v* `+ K& Q. `8 p6 I "倾斜", "\Q18;", "") '倾斜 * f: w7 N! \4 ?7 Q9 r% h
/ d- H7 i" m+ i9 h/ E
a5 = IIf(m.Characters(u, 1).Font.FontStyle =
) |* L; t+ x/ R. c) x) L- }0 |9 O/ ]; x: | { Z
"加粗", "\W1.2;", "") '加粗
2 _6 B3 K) s8 j; N/ }5 q6 [7 I1 N! m) [2 s1 f; j7 S
a6 = IIf(m.Characters(u, 1).Font.FontStyle =
5 m( H' V4 B! z3 T7 j3 a" ?; E6 k% N0 S) Z# H! J! Q) f
"加粗 倾斜", "\W1.2;\Q18;", "") ' 加粗倾斜
6 J2 D1 x: u4 c/ ~; R2 e1 u* Z4 D1 p$ ?% M
ForeFontStr = a1 + a2 + a3 + a4 + a5 + a6 " a& P+ r# w6 x
6 Y8 W. H& L3 G, s' l0 s
End Function 8 n6 l8 x" ?% E
7 @: V1 Y6 N! P9 r( z7 t% s' E (2).表格中表格文字位置的转换
8 G8 ~+ }" _$ b! O: l- B' J$ {' r- s6 C% R/ {
对文字对象的属性的直接控制来实现,通过with….end with 结构可以很容易地控制文字的高度、图层、颜色、书写方向。由于Mtext文字提供支持的排列位置分为9种,必须根据Microsoft Excel表格文字的排列方式加以合适的判定,然后进行转换。其具体的实现方法详见下面的程序。 1 x# q* _8 F# C8 f
$ C/ S ~6 \$ T+ g
Sub kz( )
1 y$ O3 _& ^+ s1 ]1 n, P+ E8 g
8 L/ K U+ U" A& T With textObj ‘文字对象 + t2 \# N! \" b1 \, R. i3 v
K: ^% y% Y. O7 F6 N" i; _# D
.Height = textHgt
& T& i: j) A' v4 i4 K$ @. G
4 o8 a, t# G" C9 y! ] .Layer = newlayer.Name ‘设置图层
. E. B& a, `3 P6 x4 D& E: U5 F, M0 M& }' e4 w5 k3 j2 P
.Color = acRed ‘设置颜色
. L, Z" y- ?+ r1 q% |' T/ P3 q5 f: _- Z1 R5 \- T/ _* d" w3 a
.DrawingDirection = 1 ‘设置书写方向
( l9 r. t2 c2 U% g0 b) }+ l' E% J, U9 y V
If (ma.VerticalAlignment = xlTop _
8 H" s: O' j9 l! ^; ^2 Q u; T: I) Z" p8 j" |1 G$ Q) `
Or ma.VerticalAlignment = xlGeneral) _
8 a$ C8 y) i- k$ k# g8 q
9 S+ W( O+ _( r+ e; L6 Z. J: \ f And (ma.HorizontalAlignment = xlLeft _
& x# Z' [ h+ Q( c5 Z
; J3 E5 H5 H9 F: R' G Or ma.HorizontalAlignment = xlGeneral) _ ) u6 @ d/ w! m, e
% p8 p" f; t7 j2 B1 L+ u0 G
Then .AttachmentPoint = 1 'acAttachmentPointTopLeft 8 Z* T; U# f* f7 W f; q9 Z
* y. ]4 W+ w& x. K
If (ma.VerticalAlignment = xlTop _
+ a& i% d) @. M& t$ E) O9 u" S$ K
8 \6 d! E. t0 ]5 J W Or ma.VerticalAlignment = xlGeneral) _ % R, B7 j( K6 d% h$ I; e5 f, d
Y& ~9 h# F" K2 a' o7 A t And (ma.HorizontalAlignment = xlCenter _ " q$ e1 [( z8 V
" H; F$ Z0 ?4 [7 U
Or ma.HorizontalAlignment = xlJustify _
4 K/ @4 F: G4 H) g5 R
3 s7 q3 W+ |) b W3 p6 s5 ~ Or ma.HorizontalAlignment = xlDistributed) _
' r1 r# _: T! ^+ O& b5 I* m- Z; k
Then .AttachmentPoint = 2 'acAttachmentPointTopCenter
: o1 Q1 }$ _2 A0 W: d
& L, F. y n6 W- t8 M5 h If (ma.VerticalAlignment = xlTop _
) R; a: B6 X7 g- `: q1 d2 P8 @! ^ C
Or ma.VerticalAlignment = xlGeneral) _
8 [$ F! V( r, l+ b2 c& i/ YAnd ma.HorizontalAlignment = xlRight _ ! U$ [% z6 B8 I0 g
! q2 v7 `. S; T d Then .AttachmentPoint = 3 'acAttachmentPointTopRight ; C8 p+ h$ B' Q* s4 W
2 _. Q4 @+ a/ c/ l& [ If (ma.VerticalAlignment = xlCenter _ , r2 a0 E4 H& |7 l& Q! z$ _
* p8 a/ |! N: u2 [2 [. P Or ma.VerticalAlignment = xlJustify _
& {5 O; ~. \5 G3 K- `) Z: O9 N5 F N, ?( ]/ H/ y6 S% H
Or ma.VerticalAlignment = xlDistributed) _
7 @' L+ e/ }1 t$ e: i; g" e. b( t$ L/ Q
And (ma.HorizontalAlignment = xlLeft _
+ i v0 P( m& i& O2 W7 `( n- C; C4 X
Or ma.HorizontalAlignment = xlGeneral) _
2 L6 g+ {0 R& D& S! T) G, ~$ X+ J1 E& n' S) J% G
Then .AttachmentPoint = 4 'acAttachmentPointMiddleLeft
9 ~/ O8 q7 ]# N- j' g; n4 e; A. Z& @" P# Y
If (ma.VerticalAlignment = xlCenter _ ( ^2 ?" }3 q2 I
& E$ u l1 S8 Y' @' F' b
Or ma.VerticalAlignment = xlJustify _
! E: H5 {' u4 g0 D; N
! z. ]) p: J# V3 i Or ma.VerticalAlignment = xlDistributed) _ 9 H3 M# L1 {. u5 [: i
, r* A3 o. o7 Y And (ma.HorizontalAlignment = xlCenter _
j |2 T: R- O6 ]
" y8 o7 v9 h0 v: ]2 m4 y7 p Or ma.HorizontalAlignment = xlJustify _
# Z! S6 s# h4 V8 i( J/ H6 r8 O% ?- ~$ \! Z
Or ma.HorizontalAlignment = xlDistributed) _
1 Z: z$ I; m# Y% b) e$ Q, G
7 s7 O, }' @# b0 b% W' r Then .AttachmentPoint = 5 'acAttachmentPointMiddleCenter ( `5 n' w7 Q% m
. I8 ?- f, d7 c: l8 h/ l% j If (ma.VerticalAlignment = xlCenter _
; x* u* ~ e: S$ |# [0 t; S& ]" W- M& q& M% @
Or ma.VerticalAlignment = xlJustify _
* r' o; D6 B, q$ [, b5 I5 b. Q" f+ ~$ n2 d# X* Y
Or ma.VerticalAlignment = xlDistributed) _
0 d- @0 d4 A; `2 F
2 J! B! s5 _$ g; _ And ma.HorizontalAlignment = xlRight _ 0 ~ v. @- ]. A0 J ]0 W- n( E
! N3 B4 R1 i6 ]! H
Then .AttachmentPoint = 6 'acAttachmentPointMiddleRight
( n: P3 ?( |4 J2 u5 `* e% f/ g$ {6 @2 |
If ma.VerticalAlignment = xlBottom _
$ F- M( g' I8 ~4 E7 \' c/ ~) D3 @) s9 f
And (ma.HorizontalAlignment = xlLeft _ - n3 F8 q2 `7 _
. |5 b+ k+ h/ |4 c& R& P
Or ma.HorizontalAlignment = xlGeneral) _
5 p9 \7 J# a f9 _; J, o& J* `& N; r
Then .AttachmentPoint = 7 'acAttachmentPointBottomLeft
/ g* c6 h! G( f0 H% G9 L- W9 Y+ }* B) C
If ma.VerticalAlignment = xlBottom _
7 d2 h: I, M/ C# B' c, S* Z7 m. i: u+ y# s+ j
And (ma.HorizontalAlignment = xlCenter _ 3 A- m( r* V: M8 Q7 C
0 U% M- r5 }5 P ] Or ma.HorizontalAlignment = xlJustify _
% d; q3 _9 B/ ~
L8 n: i5 {, y1 B& z$ R Or ma.HorizontalAlignment = xlDistributed) _ 2 j5 u1 [8 x1 G
- v* l$ D7 b5 G Then .AttachmentPoint = 8 'acAttachmentPointBottomCenter
- u0 m- W0 ^6 I# p- ]" n9 m
! p& ?. l7 j% t If ma.VerticalAlignment = xlBottom _ : d0 A5 p+ ^) e* X2 R, P5 ^ [) K
% a+ P+ i8 }2 S- l- J+ M# Z And ma.HorizontalAlignment = xlRight _ / I: e7 ^9 t( I! f, t0 `' _
' Y# q8 E3 u- X/ T Then .AttachmentPoint = 9 'acAttachmentPointBottomRight
4 ^" d+ i! p$ D2 J! M- F) N. U0 f8 q
End With : G) w, T* W1 ]' M* |# n
+ c3 ~; q& h9 T2 H# H2 L" P. u textObj.Update , j3 K+ ?+ [7 q2 I8 }; v! P' T: l
, |$ `0 R/ ^7 m; }
End Sub |
|