I am using a form in a VBA macro in Word.
In Word 2010 there is a navigation pane.
At the top you can type something to search.
I want to paste data I have in the clipboard to that navigation pane search box.
I can't seem to activate that navigation search box with what I have tried.
So my form lists out the result of a regex search into a textbox. I triple click to select the line I want to now locate in the Word document and press a button on my form.
The msgbox shows with the correct data, so that is good so far.
It is just the next step that I need. (I have commented out the SendKeys part). How to select that search box and then I can use the SendKeys part of the code.
thanks in advance for any assistance.Private Sub CommandButton48CopyTextInTextbox_Click() TextBox8refList.SetFocus TextBox8refList.Copy Dim DataObj As MSForms.DataObject Set DataObj = New MSForms.DataObject DataObj.GetFromClipboard strPaste = DataObj.GetText(1) ActiveWindow.DocumentMap = True ActiveWindow.SetFocus ActiveDocument.Activate 'SendKeys "^(f){backspace}^{v}{Enter}" MsgBox (strPaste) End Sub
Jon




Reply With Quote
