View Single Post
 
Old 11-30-2017, 05:43 AM
LaurenM LaurenM is offline Windows XP Office 2010 32bit
Novice
 
Join Date: Nov 2017
Posts: 14
LaurenM is on a distinguished road
Default Insert Rich Text Content Control in specific position, Word 2013 VBA

Is it possible to insert a rich text control control into a particular position in a Word doc template.

I have the following which works fine for a shape, but not the rich text control.

Set shp = ActiveDocument.Shapes.AddTextbox( _
Orientation:=msoTextOrientationHorizontal, _
Left:=10, Top:=5, Width:=500, Height:=41)
shp.TextFrame.TextRange.Text = "Please add company name"
shp.TextFrame.TextRange.Style = oStyle
shp.Line.Visible = msoFalse
shp.RelativeVerticalPosition = wdRelativeVerticalPositionPage
shp.Top = InchesToPoints(1.1)
shp.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
shp.Left = InchesToPoints(0.27)

Thanks in advance.
Reply With Quote