PDA

Click to See Complete Forum and Search --> : Error 5174 - File could not be found


OlgaV
Nov 24th, 1999, 12:44 AM
Hello,

I'm trying to open a document, and I think I was successful in doing so about 30 min ago, but now I get an error (Run-time error 5174: "This file could not be found")
But!!! The file DOES exist!!!

Please, help me if you can!

Thank you!

Here's my code:

Set wrd = CreateObject("Word.Application")

fileout = "C:\Test.rtf"
wrd.Documents.Open fileout

netSurfer
Nov 24th, 1999, 02:30 AM
Well, I've only done this is Access using VBA but I do the same except:


wrd.Application.Documents.Open fileout

I have Application between the wrd object and Documents. I'm not sure whether this is particular for VBA or not though. Give it a shot. Hope it helps.

OlgaV
Nov 25th, 1999, 07:58 PM
Nope, that didn't work.
It looks like the very first time I open a document, it's fine. After that - it gives me the error.

Quadrex
Nov 27th, 1999, 05:20 PM
Maybe you need to close the file when the Program quits, because it sounds like its staying in memory as being open.

Just a thought. :)

------------------
Quadrex
webmaster@quadrex.f9.co.uk
Quadrex Programming (http://www.quadrex.f9.co.uk)