![]() |
#5
|
|||
|
|||
![]()
I never implied that you were searching for the contents of the textbox. I only implied that if you used named content controls instead of ActiveX controls and knew the named control is present in the document then you could refer to it explicitly by name.
With ActiveX controls you will have to loop: Code:
Sub ScratchMacro(strNamePassedFromExceRange as String, strText) 'A basic Word macro coded by Greg Maxey Dim oILS For Each oILS In ActiveDocument.InlineShapes If oILS.OLEFormat.Object.Name = strNamePassedFromExcelRange Then oILS.OLEFormat.Object.Value = strText Exit for End If Next oILS End Sub |
Tags |
textbox, word vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro/VBA code to select ALL text in a textbox in microsoft excel and add a new row | jyfuller | Excel Programming | 11 | 06-01-2015 08:49 PM |
![]() |
sandcharles | Excel | 5 | 02-19-2015 06:15 AM |
![]() |
expinch | Word | 1 | 11-26-2014 10:05 PM |
![]() |
laurarem | Word | 1 | 02-21-2013 10:17 PM |
![]() |
scarymovie | Word VBA | 5 | 05-16-2012 07:05 PM |