Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-02-2016, 06:14 AM
gmaxey gmaxey is offline Insert and Filling Textbox using VBA Windows 7 32bit Insert and Filling Textbox using VBA 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

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

__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #2  
Old 04-02-2016, 02:35 PM
rpb925 rpb925 is offline Insert and Filling Textbox using VBA Windows 7 64bit Insert and Filling Textbox using VBA Office 2010 64bit
Novice
Insert and Filling Textbox using VBA
 
Join Date: Mar 2016
Location: Sydney
Posts: 17
rpb925 is on a distinguished road
Talking

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.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert and Filling Textbox using VBA 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
Insert and Filling Textbox using VBA 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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft