search question

G

Guest

I have the following code to search word doc from access:

Sub label49()

Dim wrd As Object
Dim wrddoc As Object
Dim strFind As String
Dim binFound as Boolean
strFind = Inputbox("Enter Text to Find")
Set wrd = GetObject(" MY FILEPATH")
wrd.Applicaton.Visible = True


When I press on the search button for this, it does ask me which txt i wish
to find, however once ive entered in txt this error message appears:

Run-time Error '2147221020 (800401E4)';
Automation error
Invalid syntax

Would anybody be able to explain this and where i have gone wrong?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top