#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default find doc

Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog learning new
tricks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default find doc

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog learning

new
tricks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default find doc

It looked at A and gave same error try a diff name etc
What I want to acomplish is open this file to edit so can cut and paste back
into excel for sorting. I am useing 2000 if that has any bearing.

"NickHK" wrote:

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog learning

new
tricks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default find doc

Think I found problem file is tied to wkbook for a mail merge

"NickHK" wrote:

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog learning

new
tricks.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default find doc

still getting same error? Made a new file to be sure same results. Yes file
is there don't know where to go next

"NickHK" wrote:

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog learning

new
tricks.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default find doc

last shot my full code error still cannot find file
Sub word()

Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\desc.DOC")
'Or for a new doc:
Set WRDDOC = WRDAPP.Documents.Add

WRDAPP.Visible = True
WRDAPP.Quit

End Sub


"NickHK" wrote:

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog learning

new
tricks.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default find doc

Curt,
Which error (number & description) are you getting ?

NickHK

"Curt" wrote in message
...
still getting same error? Made a new file to be sure same results. Yes

file
is there don't know where to go next

"NickHK" wrote:

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name

present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog

learning
new
tricks.






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default find doc

Curt,
Yes, that's what I get for wrong filename/path.
Sure the filename's correct ?
And you have permission to read that folder ?

NickHK

"Curt" wrote in message
...
useing excel 2000 run time error 5174
Think I may change direction and try to go to sheet 2 enlarge a cell then
copy back to sheet 1.
Thanks for your concern It is a asset to have people who are willing to

help
Thanks
Curt

"NickHK" wrote:

Curt,
Which error (number & description) are you getting ?

NickHK

"Curt" wrote in message
...
still getting same error? Made a new file to be sure same results. Yes

file
is there don't know where to go next

"NickHK" wrote:

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name

present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog

learning
new
tricks.









  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default find doc

found out some how code was adding .doc.doc to file names
Thanks

"NickHK" wrote:

Curt,
Yes, that's what I get for wrong filename/path.
Sure the filename's correct ?
And you have permission to read that folder ?

NickHK

"Curt" wrote in message
...
useing excel 2000 run time error 5174
Think I may change direction and try to go to sheet 2 enlarge a cell then
copy back to sheet 1.
Thanks for your concern It is a asset to have people who are willing to

help
Thanks
Curt

"NickHK" wrote:

Curt,
Which error (number & description) are you getting ?

NickHK

"Curt" wrote in message
...
still getting same error? Made a new file to be sure same results. Yes
file
is there don't know where to go next

"NickHK" wrote:

Curt,
Your code work if the file exist, otherwise err.number=5174.

You sure the A drive (floppy ?) is accessible and has that file name
present
?

You can add a
WRDAPP.Visible = True
to see what word is doing/showing.

NickHK

"Curt" wrote in message
...
Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("A:\card.doc")
Knowing file is in location. Why do I get cannot find?
Have tried many examples with no luck
Want to build a macro that will open a word doc (card.doc)
If can find start can adjust. Just not good as starter. Old dog
learning
new
tricks.










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
find and delete duplicate entries in two columns or find and prin. campare 2 columns of numbers-find unique Excel Programming 1 November 24th 04 04:09 PM
find and delete text, find a 10-digit number and put it in a textbox Paul Excel Programming 3 November 16th 04 04:21 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"