View Single Post
 
Old 10-03-2015, 04:40 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

You will need to take Graham's suggestion a bit further to set all of the properties you are after:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oCtrl As InlineShape
  With Selection
    .MoveRight Unit:=wdCharacter, Count:=2
    Set oCtrl = .InlineShapes.AddOLEControl(ClassType:="Forms.TextBox.1", Range:=.Range)
    .MoveLeft Unit:=wdCharacter, Count:=1
    .TypeParagraph
  End With
  With oCtrl.OLEFormat.Object
    .Height = 18
    .Width = 200
    .MultiLine = True
    .ScrollBars = 2
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote