![]() |
|
#3
|
|||
|
|||
|
The following runs fine when run from within Word. What line of your code is throwing the error?
Code:
Sub Textbox()
Dim wdApp As Word.Application
Dim wdDoc As Word.Document
Dim wdShp As Word.Shape
'Set wdApp = CreateObject("Word.Application")
With Application
.Visible = True
.ScreenUpdating = False
Set wdDoc = .Documents.Add
Set wdShp = wdDoc.Shapes.AddTextbox(Orientation:=msoTextOrientationVertical, Left:=10, Top:=10, Width:=70, Height:=200)
With wdShp.TextFrame
.TextRange = "MEMO"
.TextRange.Font.Name = "Arial"
.TextRange.Font.Size = "48"
End With
.ScreenUpdating = True
End With
Set wdDoc = Nothing: Set wdShp = Nothing
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Restrict Editing function disable insert textbox function
|
IanM_01 | Word | 5 | 11-21-2015 02:29 AM |
| Insert superscript into a textbox | Deltaj | Word VBA | 3 | 11-30-2014 04:23 PM |
| insert text in freeform graphic (make it a textbox) | fzr | Word | 2 | 09-03-2014 05:54 AM |
Display result in textbox based on the input of another textbox
|
scarymovie | Word VBA | 5 | 05-16-2012 07:05 PM |
| How to insert a hyperlink in activex textbox | Joe Patrick | Word VBA | 1 | 10-03-2011 06:03 AM |