Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
Macro for Picture size and crop, layout and position in table.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Stefan Blom, post: 7408233"] There isn't much traffic in this newsgroup anymore, so you should post in a programming forum at MSDN. For example, try the Word for Developers forum at [URL]http://social.msdn.microsoft.com/Forums/en-US/worddev/threads[/URL] (if you haven't already). -- Stefan Blom Microsoft Word MVP [email]rv.aleixo.alves@gmail.com[/email] wrote in message Hello, everyone! I'm trying to make a macro to format pictures automatically after I insert them in a table in a word document. I want to resize the pictures to 60% (Height and Width) and crop the margins (0.6 centimetres from top, left and right and 0.4 from bottom). Then I want the picture, to be inside the table, to have a text wrapping = Top and bottom, send to backwards, and then I want to change its layout to: horizontal alignment center relative to column; vertical absolute position, 0 cm to paragraph. What I've accomplished so far (reading this group) was this macro code: Sub FDiagCoord() On Error GoTo ErrorHandler Dim oILS As InlineShape Set oILS = Selection.InlineShapes(1) With oILS .PictureFormat.CropLeft = CentimetersToPoints(0.6) .PictureFormat.CropTop = CentimetersToPoints(0.6) .PictureFormat.CropRight = CentimetersToPoints(0.6) .PictureFormat.CropBottom = CentimetersToPoints(0.4) End With With oILS .LockAspectRatio = True .ScaleHeight = 60 End With Set oShp = Selection.InlineShapes(1).ConvertToShape oShp.WrapFormat.Type = wdWrapTopBottom oShp.ZOrderCmd = msoSendBackward oShp.RelativeHorizontalPosition = wdRelativeHorizontalPositionColumn oShp.wdRelativeHorizontalPositionColumn = wdCenter Exit Sub ErrorHandler: MsgBox "No picture selected." End Sub It doesn't work completely, something is missing... And I'm stuck for quiet a while now... Can somebody help me? :) Thank you very much, Ricardo [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
Macro for Picture size and crop, layout and position in table.
Top