Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word 2010 VBA how to make a border and set text wrap to top and bottom 1

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I insert a image and need to set the border to 1 pt and the text wrap to top and bottom this is what I uwse most of the time with and image.

I use to do this in previous 5 versions of Word since back to '95 but now 2010 does not record any Mouse events in the macro! it dose not seem to record anything at all? I have recorded stuff in 2007. What am I doing wrong. this is frustrating since it used to be a snap and I had Macors all over the place in new tool bars as well.
Wish I could ahve extra tool bars too that I used to drag around as needed.

Am I the only one that uses Word for all types of sophisticated documents?

TIA

DougP
 
FYI this is all I got trying to record a macro? ??????
Code:
Sub ImageAddFrame_TextWrapTB()
'
' ImageAddFrame_TextWrapTB Macro
'
'
End Sub

DougP
 
Try:
Code:
Sub Demo()
Dim Shp As Shape
With Selection
  If .InlineShapes.Count = 1 Then
    Set Shp = .InlineShapes(1).ConvertToShape
  Else
    Set Shp = .ShapeRange(1)
  End If
  With Shp
    With .WrapFormat
      .Type = wdWrapTopBottom
      .DistanceTop = InchesToPoints(0.1)
      .DistanceBottom = InchesToPoints(0.1)
    End With
    With .Line
      .Weight = 1#
      .ForeColor.RGB = RGB(0, 0, 0)
    End With
  End With
End With
End Sub

Cheers
Paul Edstein
[MS MVP - Word]
 
Oh My God!!! Paul
it works great.
have a STAR !!!!!

[r2d2] <<< hey this droid love's you too, he's in my living room.
see him here on his own WEB site robots2000.com

DougP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top