Hi,
Got a special here. Trying to create an ‘instant insert’ button within Excel. Intention is that it inserts whatever is selected into the activedocument in Word at the point where the cursor is positioned – regardless.
In Excel I’ve come this far – however the final ‘paste’ will not work… (I think ‘Selection’ is the problem, but am not sure as my object is late bound)
Public Sub TEST()
Dim oWd As Object
Dim oDoc As Object
On Error Resume Next
Set oWd = GetObject(Class:=”Word.application”)
If Err.number = 429 Then
Set oWd = CreateObject(Class:=”Word.application”)
Err.Clear
ElseIf Err.number 0 Then
MsgBox Err.number & “; ” & Err.Description
End If
Set oDoc = ActiveDocument
Debug.Print oDoc.Name
‘….some sort of selection – paste’
oWd.Visible = True
Set oDoc = Nothing
Set oWd = Nothing
End Sub
Good suggestions are more than welcome / LoL