p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: Access Run-Time


Message #1 by "Richard Berry" <Richard@D...> on Tue, 4 Jun 2002 18:29:31 +0100
Hi All,
I am having problems using the Microsoft Word object from a machine that is
using a run-time version of Access rather that a full Access installation.
The word object references work perfectly when using the full version.

The error message is  - Method 'find' of object 'range' failed - and is
error number -2147221163. It occurs in the code that searches the word
document and replaces the bookmark with the data.

Has anyone any ideas, or better still, has anyone had this issue with
run-time Access and Word before?


Regards
Richard Berry
Desktop Logic Limited
Tel: 08707 486486
Fax: 08707 486487
Email: Richard@D...
Web: www.desktoplogic.co.uk


Message #2 by "Carnley, Dave" <dcarnley@a...> on Tue, 4 Jun 2002 12:48:03 -0500
I've had some odd-ball issues, but not this one specifically.  If I install
to a new machine and get strange errors dealing with office objects, I open
Excel, go to the VBA editor, and make reference to Word object library.
Exit Excel if it didn't crash.  Sometimes excel crashes at this point.
Whether it crashes or not, my Access run-time program will usually work
after I do this.  I have no idea why this makes any difference.

I've got a program that does the same thing - replace bookmarks - and it
works fine!  I don't use range.find, I just make an assignment to
range.text.

    Dim B As Word.Bookmark
    For Each B In d.Bookmarks
        DoEvents
        B.Range.Font.Name = "Arial"
        B.Range.Font.Size = 10
        B.Range.Bold = True
        'each bookmark has a unique name, substitute the text from the db
        Select Case B.Name
              "bkNewQuantity": B.Range.Text = objTCF.NewQuantity



-----Original Message-----
From: Richard Berry [mailto:Richard@D...]
Sent: Tuesday, June 04, 2002 12:30 PM
To: Access
Subject: [access] Access Run-Time
Sensitivity: Private


Hi All,
I am having problems using the Microsoft Word object from a machine that is
using a run-time version of Access rather that a full Access installation.
The word object references work perfectly when using the full version.

The error message is  - Method 'find' of object 'range' failed - and is
error number -2147221163. It occurs in the code that searches the word
document and replaces the bookmark with the data.

Has anyone any ideas, or better still, has anyone had this issue with
run-time Access and Word before?


Regards
Richard Berry
Desktop Logic Limited
Tel: 08707 486486
Fax: 08707 486487
Email: Richard@D...
Web: www.desktoplogic.co.uk



Message #3 by "Richard Berry" <Richard@D...> on Tue, 4 Jun 2002 19:22:00 +0100
Dave,
Thank you. The machines that this program runs on does not have Excel loaded
either. It will only have Word and Outlook, and both are required for the
system to run.

Have you got the additional code that will make your find routine complete
please?

Regards
Richard Berry
Desktop Logic Limited
Tel: 08707 486486
Fax: 08707 486487
Email: Richard@D...
Web: www.desktoplogic.co.uk

 -----Original Message-----
From: 	Carnley, Dave [mailto:dcarnley@a...]
Sent:	04 June 2002 18:48
To:	Access
Subject:	[access] RE: Access Run-Time
Sensitivity:	Private

I've had some odd-ball issues, but not this one specifically.  If I install
to a new machine and get strange errors dealing with office objects, I open
Excel, go to the VBA editor, and make reference to Word object library.
Exit Excel if it didn't crash.  Sometimes excel crashes at this point.
Whether it crashes or not, my Access run-time program will usually work
after I do this.  I have no idea why this makes any difference.

I've got a program that does the same thing - replace bookmarks - and it
works fine!  I don't use range.find, I just make an assignment to
range.text.

    Dim B As Word.Bookmark
    For Each B In d.Bookmarks
        DoEvents
        B.Range.Font.Name = "Arial"
        B.Range.Font.Size = 10
        B.Range.Bold = True
        'each bookmark has a unique name, substitute the text from the db
        Select Case B.Name
              "bkNewQuantity": B.Range.Text = objTCF.NewQuantity



-----Original Message-----
From: Richard Berry [mailto:Richard@D...]
Sent: Tuesday, June 04, 2002 12:30 PM
To: Access
Subject: [access] Access Run-Time
Sensitivity: Private


Hi All,
I am having problems using the Microsoft Word object from a machine that is
using a run-time version of Access rather that a full Access installation.
The word object references work perfectly when using the full version.

The error message is  - Method 'find' of object 'range' failed - and is
error number -2147221163. It occurs in the code that searches the word
document and replaces the bookmark with the data.

Has anyone any ideas, or better still, has anyone had this issue with
run-time Access and Word before?


Regards
Richard Berry
Desktop Logic Limited
Tel: 08707 486486
Fax: 08707 486487
Email: Richard@D...
Web: www.desktoplogic.co.uk






  Return to Index