![]() |
|
|
|
#1
|
|||
|
|||
|
I would assume you hare using early binding and ave a reference to the Word Object module set in your project. I used late binding as shown and it worked without issue from Access 2016:
Code:
Sub Textbox()
Dim wdApp As Object
Dim wdDoc As Object
Dim wdShp As Object
Set wdApp = CreateObject("Word.Application")
With wdApp
.Visible = True
.ScreenUpdating = False
Set wdDoc = .Documents.Add
With wdDoc
Set wdShp = .Shapes.AddTextbox(Orientation:=5, Left:=10, Top:=10, Width:=10, Height:=10)
End With
.ScreenUpdating = True
End With
Set wdDoc = Nothing: Set wdApp = Nothing: Set wdShp = Nothing
End Sub
|
|
#2
|
|||
|
|||
|
Legendary. It was the text direction command it was tripping on. Once replaced with msoTextDirection with a numerical value as you did it works well. Definitely would not have worked that one out on my own. It seems to run both as a Object and Word.Shape with no issues.
Thanks Greg. Appreciate it. |
|
| Thread Tools | |
| Display Modes | |
|
|
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 |