OK to align shape w/ top of para?

B

Barbara

I have a macro to format a graphic as a floating shape right-aligned against
the margin and top-aligned with the current paragraph. The core of the code
is:

With myShape
.WrapFormat.Type = wdWrapSquare
.WrapFormat.DistanceTop = 0
.WrapFormat.DistanceBottom = 0
.WrapFormat.DistanceLeft = 9
.WrapFormat.DistanceRight = 0
.RelativeHorizontalPosition = wdRelativeHorizontalPositionMargin
.Left = wdShapeRight
.RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
.Top = wdShapeTop
End With

I am a little nervous about using wdRelativeVerticalPositionParagraph here,
because the Format Picture dialog does not offer "relative to paragraph" as
an option for a square-wrapped picture. And when I look at the settings in
the dialog after running the macro, it says that the vertical alignment is
"top relative to page." The macro does seem to do what I want, namely, align
the graphic with the top of the paragraph. Is there any reason NOT to use
this option? (Why won't Word let a normal user align the picture with the top
of the paragraph?)

Thanks!
 
C

Cindy M.

Hi Barbara,
I am a little nervous about using wdRelativeVerticalPositionParagraph here,
because the Format Picture dialog does not offer "relative to paragraph" as
an option for a square-wrapped picture. And when I look at the settings in
the dialog after running the macro, it says that the vertical alignment is
"top relative to page." The macro does seem to do what I want, namely, align
the graphic with the top of the paragraph. Is there any reason NOT to use
this option? (Why won't Word let a normal user align the picture with the top
of the paragraph?)
I do find the option to align to the paragraph in the dialog box. It's the
"absolute" option. Set it to 0 and relative to the paragraph. "Move with text"
also needs to be activated.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
B

Barbara

Thanks, Cindy! After looking a little more carefully at the online help, I
think I should also change ".Top = wdShapeTop" to ".Top = 0". That seems to
make everything work out right.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top