Have a rtf file saved as a word.doc no good for locate. No matter how I try
to use this file code will not locate file. Is there a way to convert this
file so it is a reconizable word.dco? It opens with word ok. I am useing
office 2000.
Thanks

Re: converting a file by Graham

Graham
Tue Nov 27 00:24:07 PST 2007

If you saved the rtf file as a Word Document then that's what it now is.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Curt wrote:
> Have a rtf file saved as a word.doc no good for locate. No matter how
> I try to use this file code will not locate file. Is there a way to
> convert this file so it is a reconizable word.dco? It opens with word
> ok. I am useing office 2000.
> Thanks



Re: converting a file by Curt

Curt
Tue Nov 27 13:43:01 PST 2007

What I don't understand is why the following code will not find this file. It
will only find it if I use the complete path from the properties of file.
yearly is a .doc I wrote yearlya is the converted file. Both files a next to
each other in folder. Reason for shorten path is for use on machines that do
not load to C. Want program to look in folder.
Thanks
Private Sub optionbutton35_Click()
OptionButton35.Value = False
Dim Word As New Word.Application
Dim WordDoc As Word.Document
Word.Visible = True
Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
End Sub
Private Sub Optionbutton36_Click()
OptionButton36.Value = False
'Call year
Dim Word As New Word.Application
Dim WordDoc As Word.Document
Set Word = New Word.Application
Word.Visible = True
Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
Word.Visible = True
end sub

"Graham Mayor" wrote:

> If you saved the rtf file as a Word Document then that's what it now is.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> Curt wrote:
> > Have a rtf file saved as a word.doc no good for locate. No matter how
> > I try to use this file code will not locate file. Is there a way to
> > convert this file so it is a reconizable word.dco? It opens with word
> > ok. I am useing office 2000.
> > Thanks
>
>
>

Re: converting a file by Graham

Graham
Tue Nov 27 23:39:00 PST 2007

It won't work because you have not told the macro from where to start
looking for the path. . You will need to ensure that your documents are
filed with direct relationship to (say) the Word documents folder and adjust
the relative path to suit in order for the command to find it.
eg
Dim WordDoc As Word.Document
Dim ParadePath As String
ParadePath = Options.DefaultFilePath(wdDocumentsPath)
Set WordDoc = Word.Documents.Open(ParadePath & "\parade\yearly.doc")

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Curt wrote:
> What I don't understand is why the following code will not find this
> file. It will only find it if I use the complete path from the
> properties of file. yearly is a .doc I wrote yearlya is the converted
> file. Both files a next to each other in folder. Reason for shorten
> path is for use on machines that do not load to C. Want program to
> look in folder.
> Thanks
> Private Sub optionbutton35_Click()
> OptionButton35.Value = False
> Dim Word As New Word.Application
> Dim WordDoc As Word.Document
> Word.Visible = True
> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
> End Sub
> Private Sub Optionbutton36_Click()
> OptionButton36.Value = False
> 'Call year
> Dim Word As New Word.Application
> Dim WordDoc As Word.Document
> Set Word = New Word.Application
> Word.Visible = True
> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
> Word.Visible = True
> end sub
>
> "Graham Mayor" wrote:
>
>> If you saved the rtf file as a Word Document then that's what it now
>> is.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>> Curt wrote:
>>> Have a rtf file saved as a word.doc no good for locate. No matter
>>> how I try to use this file code will not locate file. Is there a
>>> way to convert this file so it is a reconizable word.dco? It opens
>>> with word ok. I am useing office 2000.
>>> Thanks



Re: converting a file by Curt

Curt
Wed Nov 28 06:02:01 PST 2007

appreciate your responce. The path works on file I created (yearly)not on
converted (yearlya) in same folder also I've learned that the converted file
was created in office 2003 I am useing 2000 this may be problem.
Thanks Again

"Graham Mayor" wrote:

> It won't work because you have not told the macro from where to start
> looking for the path. . You will need to ensure that your documents are
> filed with direct relationship to (say) the Word documents folder and adjust
> the relative path to suit in order for the command to find it.
> eg
> Dim WordDoc As Word.Document
> Dim ParadePath As String
> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
> Set WordDoc = Word.Documents.Open(ParadePath & "\parade\yearly.doc")
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
>
> Curt wrote:
> > What I don't understand is why the following code will not find this
> > file. It will only find it if I use the complete path from the
> > properties of file. yearly is a .doc I wrote yearlya is the converted
> > file. Both files a next to each other in folder. Reason for shorten
> > path is for use on machines that do not load to C. Want program to
> > look in folder.
> > Thanks
> > Private Sub optionbutton35_Click()
> > OptionButton35.Value = False
> > Dim Word As New Word.Application
> > Dim WordDoc As Word.Document
> > Word.Visible = True
> > Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
> > End Sub
> > Private Sub Optionbutton36_Click()
> > OptionButton36.Value = False
> > 'Call year
> > Dim Word As New Word.Application
> > Dim WordDoc As Word.Document
> > Set Word = New Word.Application
> > Word.Visible = True
> > Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
> > Word.Visible = True
> > end sub
> >
> > "Graham Mayor" wrote:
> >
> >> If you saved the rtf file as a Word Document then that's what it now
> >> is.
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >> Curt wrote:
> >>> Have a rtf file saved as a word.doc no good for locate. No matter
> >>> how I try to use this file code will not locate file. Is there a
> >>> way to convert this file so it is a reconizable word.dco? It opens
> >>> with word ok. I am useing office 2000.
> >>> Thanks
>
>
>

Re: converting a file by Graham

Graham
Wed Nov 28 07:08:04 PST 2007

I suspect it is more to do with the fact that once you have opened the first
file, while Word remains open, the focus has moved from the default folder
to the folder that contains the first document so that path would need to be
from there or you would have to reset the path to its default before opening
the second document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Curt wrote:
> appreciate your responce. The path works on file I created
> (yearly)not on converted (yearlya) in same folder also I've learned
> that the converted file was created in office 2003 I am useing 2000
> this may be problem.
> Thanks Again
>
> "Graham Mayor" wrote:
>
>> It won't work because you have not told the macro from where to start
>> looking for the path. . You will need to ensure that your documents
>> are filed with direct relationship to (say) the Word documents
>> folder and adjust the relative path to suit in order for the command
>> to find it.
>> eg
>> Dim WordDoc As Word.Document
>> Dim ParadePath As String
>> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
>> Set WordDoc = Word.Documents.Open(ParadePath & "\parade\yearly.doc")
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>>
>> Curt wrote:
>>> What I don't understand is why the following code will not find this
>>> file. It will only find it if I use the complete path from the
>>> properties of file. yearly is a .doc I wrote yearlya is the
>>> converted file. Both files a next to each other in folder. Reason
>>> for shorten path is for use on machines that do not load to C. Want
>>> program to look in folder.
>>> Thanks
>>> Private Sub optionbutton35_Click()
>>> OptionButton35.Value = False
>>> Dim Word As New Word.Application
>>> Dim WordDoc As Word.Document
>>> Word.Visible = True
>>> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
>>> End Sub
>>> Private Sub Optionbutton36_Click()
>>> OptionButton36.Value = False
>>> 'Call year
>>> Dim Word As New Word.Application
>>> Dim WordDoc As Word.Document
>>> Set Word = New Word.Application
>>> Word.Visible = True
>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
>>> Word.Visible = True
>>> end sub
>>>
>>> "Graham Mayor" wrote:
>>>
>>>> If you saved the rtf file as a Word Document then that's what it
>>>> now is.
>>>>
>>>> --
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>> Graham Mayor - Word MVP
>>>>
>>>> My web site www.gmayor.com
>>>> Word MVP web site http://word.mvps.org
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>
>>>> Curt wrote:
>>>>> Have a rtf file saved as a word.doc no good for locate. No matter
>>>>> how I try to use this file code will not locate file. Is there a
>>>>> way to convert this file so it is a reconizable word.dco? It opens
>>>>> with word ok. I am useing office 2000.
>>>>> Thanks



Re: converting a file by Graham

Graham
Wed Nov 28 07:12:11 PST 2007

On further reflection try removing the path from the second document. If it
is opened from the same folder as the first the path will be wrong.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Graham Mayor wrote:
> I suspect it is more to do with the fact that once you have opened
> the first file, while Word remains open, the focus has moved from the
> default folder to the folder that contains the first document so that
> path would need to be from there or you would have to reset the path
> to its default before opening the second document.
>
>
> Curt wrote:
>> appreciate your responce. The path works on file I created
>> (yearly)not on converted (yearlya) in same folder also I've learned
>> that the converted file was created in office 2003 I am useing 2000
>> this may be problem.
>> Thanks Again
>>
>> "Graham Mayor" wrote:
>>
>>> It won't work because you have not told the macro from where to
>>> start looking for the path. . You will need to ensure that your
>>> documents are filed with direct relationship to (say) the Word
>>> documents folder and adjust the relative path to suit in order for
>>> the command to find it.
>>> eg
>>> Dim WordDoc As Word.Document
>>> Dim ParadePath As String
>>> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
>>> Set WordDoc = Word.Documents.Open(ParadePath & "\parade\yearly.doc")
>>>
>>> --
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>> Graham Mayor - Word MVP
>>>
>>> My web site www.gmayor.com
>>> Word MVP web site http://word.mvps.org
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>
>>>
>>>
>>> Curt wrote:
>>>> What I don't understand is why the following code will not find
>>>> this file. It will only find it if I use the complete path from the
>>>> properties of file. yearly is a .doc I wrote yearlya is the
>>>> converted file. Both files a next to each other in folder. Reason
>>>> for shorten path is for use on machines that do not load to C. Want
>>>> program to look in folder.
>>>> Thanks
>>>> Private Sub optionbutton35_Click()
>>>> OptionButton35.Value = False
>>>> Dim Word As New Word.Application
>>>> Dim WordDoc As Word.Document
>>>> Word.Visible = True
>>>> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
>>>> End Sub
>>>> Private Sub Optionbutton36_Click()
>>>> OptionButton36.Value = False
>>>> 'Call year
>>>> Dim Word As New Word.Application
>>>> Dim WordDoc As Word.Document
>>>> Set Word = New Word.Application
>>>> Word.Visible = True
>>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
>>>> Word.Visible = True
>>>> end sub
>>>>
>>>> "Graham Mayor" wrote:
>>>>
>>>>> If you saved the rtf file as a Word Document then that's what it
>>>>> now is.
>>>>>
>>>>> --
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>> Graham Mayor - Word MVP
>>>>>
>>>>> My web site www.gmayor.com
>>>>> Word MVP web site http://word.mvps.org
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>
>>>>> Curt wrote:
>>>>>> Have a rtf file saved as a word.doc no good for locate. No matter
>>>>>> how I try to use this file code will not locate file. Is there a
>>>>>> way to convert this file so it is a reconizable word.dco? It
>>>>>> opens with word ok. I am useing office 2000.
>>>>>> Thanks



Re: converting a file by Curt

Curt
Wed Nov 28 14:20:00 PST 2007

both documents are not open at same time. Each is opened from a userform
seperatly. I have put yearlya into both code areas same results. Yearly opens
but converted file cannot find. I don't follow how I cam remove the path from
code and have any thing happen.
Will keep experminting
Thanks Again

"Graham Mayor" wrote:

> On further reflection try removing the path from the second document. If it
> is opened from the same folder as the first the path will be wrong.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> Graham Mayor wrote:
> > I suspect it is more to do with the fact that once you have opened
> > the first file, while Word remains open, the focus has moved from the
> > default folder to the folder that contains the first document so that
> > path would need to be from there or you would have to reset the path
> > to its default before opening the second document.
> >
> >
> > Curt wrote:
> >> appreciate your responce. The path works on file I created
> >> (yearly)not on converted (yearlya) in same folder also I've learned
> >> that the converted file was created in office 2003 I am useing 2000
> >> this may be problem.
> >> Thanks Again
> >>
> >> "Graham Mayor" wrote:
> >>
> >>> It won't work because you have not told the macro from where to
> >>> start looking for the path. . You will need to ensure that your
> >>> documents are filed with direct relationship to (say) the Word
> >>> documents folder and adjust the relative path to suit in order for
> >>> the command to find it.
> >>> eg
> >>> Dim WordDoc As Word.Document
> >>> Dim ParadePath As String
> >>> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
> >>> Set WordDoc = Word.Documents.Open(ParadePath & "\parade\yearly.doc")
> >>>
> >>> --
> >>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>> Graham Mayor - Word MVP
> >>>
> >>> My web site www.gmayor.com
> >>> Word MVP web site http://word.mvps.org
> >>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>
> >>>
> >>>
> >>> Curt wrote:
> >>>> What I don't understand is why the following code will not find
> >>>> this file. It will only find it if I use the complete path from the
> >>>> properties of file. yearly is a .doc I wrote yearlya is the
> >>>> converted file. Both files a next to each other in folder. Reason
> >>>> for shorten path is for use on machines that do not load to C. Want
> >>>> program to look in folder.
> >>>> Thanks
> >>>> Private Sub optionbutton35_Click()
> >>>> OptionButton35.Value = False
> >>>> Dim Word As New Word.Application
> >>>> Dim WordDoc As Word.Document
> >>>> Word.Visible = True
> >>>> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
> >>>> End Sub
> >>>> Private Sub Optionbutton36_Click()
> >>>> OptionButton36.Value = False
> >>>> 'Call year
> >>>> Dim Word As New Word.Application
> >>>> Dim WordDoc As Word.Document
> >>>> Set Word = New Word.Application
> >>>> Word.Visible = True
> >>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
> >>>> Word.Visible = True
> >>>> end sub
> >>>>
> >>>> "Graham Mayor" wrote:
> >>>>
> >>>>> If you saved the rtf file as a Word Document then that's what it
> >>>>> now is.
> >>>>>
> >>>>> --
> >>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>> Graham Mayor - Word MVP
> >>>>>
> >>>>> My web site www.gmayor.com
> >>>>> Word MVP web site http://word.mvps.org
> >>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>
> >>>>> Curt wrote:
> >>>>>> Have a rtf file saved as a word.doc no good for locate. No matter
> >>>>>> how I try to use this file code will not locate file. Is there a
> >>>>>> way to convert this file so it is a reconizable word.dco? It
> >>>>>> opens with word ok. I am useing office 2000.
> >>>>>> Thanks
>
>
>

Re: converting a file by Graham

Graham
Wed Nov 28 22:18:15 PST 2007

When you open a document from a location other than the default document
location Word shifts focus to that folder for the purpose of file > open,
until you close Word or until you open a document from another folder.
Without having your document/code to verify, once the first document is
opened then the focus is moved to the folder that contains it. So my
conjecture was that if you change
Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
to
Set WordDoc = Word.Documents.Open("yearlya.doc")
the document may be found.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Curt wrote:
> both documents are not open at same time. Each is opened from a
> userform seperatly. I have put yearlya into both code areas same
> results. Yearly opens but converted file cannot find. I don't follow
> how I cam remove the path from code and have any thing happen.
> Will keep experminting
> Thanks Again
>
> "Graham Mayor" wrote:
>
>> On further reflection try removing the path from the second
>> document. If it is opened from the same folder as the first the path
>> will be wrong.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>> Graham Mayor wrote:
>>> I suspect it is more to do with the fact that once you have opened
>>> the first file, while Word remains open, the focus has moved from
>>> the default folder to the folder that contains the first document
>>> so that path would need to be from there or you would have to reset
>>> the path to its default before opening the second document.
>>>
>>>
>>> Curt wrote:
>>>> appreciate your responce. The path works on file I created
>>>> (yearly)not on converted (yearlya) in same folder also I've learned
>>>> that the converted file was created in office 2003 I am useing 2000
>>>> this may be problem.
>>>> Thanks Again
>>>>
>>>> "Graham Mayor" wrote:
>>>>
>>>>> It won't work because you have not told the macro from where to
>>>>> start looking for the path. . You will need to ensure that your
>>>>> documents are filed with direct relationship to (say) the Word
>>>>> documents folder and adjust the relative path to suit in order for
>>>>> the command to find it.
>>>>> eg
>>>>> Dim WordDoc As Word.Document
>>>>> Dim ParadePath As String
>>>>> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
>>>>> Set WordDoc = Word.Documents.Open(ParadePath &
>>>>> "\parade\yearly.doc")
>>>>>
>>>>> --
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>> Graham Mayor - Word MVP
>>>>>
>>>>> My web site www.gmayor.com
>>>>> Word MVP web site http://word.mvps.org
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>
>>>>>
>>>>>
>>>>> Curt wrote:
>>>>>> What I don't understand is why the following code will not find
>>>>>> this file. It will only find it if I use the complete path from
>>>>>> the properties of file. yearly is a .doc I wrote yearlya is the
>>>>>> converted file. Both files a next to each other in folder. Reason
>>>>>> for shorten path is for use on machines that do not load to C.
>>>>>> Want program to look in folder.
>>>>>> Thanks
>>>>>> Private Sub optionbutton35_Click()
>>>>>> OptionButton35.Value = False
>>>>>> Dim Word As New Word.Application
>>>>>> Dim WordDoc As Word.Document
>>>>>> Word.Visible = True
>>>>>> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
>>>>>> End Sub
>>>>>> Private Sub Optionbutton36_Click()
>>>>>> OptionButton36.Value = False
>>>>>> 'Call year
>>>>>> Dim Word As New Word.Application
>>>>>> Dim WordDoc As Word.Document
>>>>>> Set Word = New Word.Application
>>>>>> Word.Visible = True
>>>>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
>>>>>> Word.Visible = True
>>>>>> end sub
>>>>>>
>>>>>> "Graham Mayor" wrote:
>>>>>>
>>>>>>> If you saved the rtf file as a Word Document then that's what it
>>>>>>> now is.
>>>>>>>
>>>>>>> --
>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>> Graham Mayor - Word MVP
>>>>>>>
>>>>>>> My web site www.gmayor.com
>>>>>>> Word MVP web site http://word.mvps.org
>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>>
>>>>>>> Curt wrote:
>>>>>>>> Have a rtf file saved as a word.doc no good for locate. No
>>>>>>>> matter how I try to use this file code will not locate file.
>>>>>>>> Is there a way to convert this file so it is a reconizable
>>>>>>>> word.dco? It opens with word ok. I am useing office 2000.
>>>>>>>> Thanks



Re: converting a file by Curt

Curt
Thu Nov 29 11:43:01 PST 2007

Have tried what you suggested to no avail. I think I've tried every way I can
think of to get it to find this file. on the 27 I did post my code each
routine is opened from a option button on a user form. could the fact that
yearlya was created in a newer version than I am useing be the culprit?

"Graham Mayor" wrote:

> When you open a document from a location other than the default document
> location Word shifts focus to that folder for the purpose of file > open,
> until you close Word or until you open a document from another folder.
> Without having your document/code to verify, once the first document is
> opened then the focus is moved to the folder that contains it. So my
> conjecture was that if you change
> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
> to
> Set WordDoc = Word.Documents.Open("yearlya.doc")
> the document may be found.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> Curt wrote:
> > both documents are not open at same time. Each is opened from a
> > userform seperatly. I have put yearlya into both code areas same
> > results. Yearly opens but converted file cannot find. I don't follow
> > how I cam remove the path from code and have any thing happen.
> > Will keep experminting
> > Thanks Again
> >
> > "Graham Mayor" wrote:
> >
> >> On further reflection try removing the path from the second
> >> document. If it is opened from the same folder as the first the path
> >> will be wrong.
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >> Graham Mayor wrote:
> >>> I suspect it is more to do with the fact that once you have opened
> >>> the first file, while Word remains open, the focus has moved from
> >>> the default folder to the folder that contains the first document
> >>> so that path would need to be from there or you would have to reset
> >>> the path to its default before opening the second document.
> >>>
> >>>
> >>> Curt wrote:
> >>>> appreciate your responce. The path works on file I created
> >>>> (yearly)not on converted (yearlya) in same folder also I've learned
> >>>> that the converted file was created in office 2003 I am useing 2000
> >>>> this may be problem.
> >>>> Thanks Again
> >>>>
> >>>> "Graham Mayor" wrote:
> >>>>
> >>>>> It won't work because you have not told the macro from where to
> >>>>> start looking for the path. . You will need to ensure that your
> >>>>> documents are filed with direct relationship to (say) the Word
> >>>>> documents folder and adjust the relative path to suit in order for
> >>>>> the command to find it.
> >>>>> eg
> >>>>> Dim WordDoc As Word.Document
> >>>>> Dim ParadePath As String
> >>>>> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
> >>>>> Set WordDoc = Word.Documents.Open(ParadePath &
> >>>>> "\parade\yearly.doc")
> >>>>>
> >>>>> --
> >>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>> Graham Mayor - Word MVP
> >>>>>
> >>>>> My web site www.gmayor.com
> >>>>> Word MVP web site http://word.mvps.org
> >>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>
> >>>>>
> >>>>>
> >>>>> Curt wrote:
> >>>>>> What I don't understand is why the following code will not find
> >>>>>> this file. It will only find it if I use the complete path from
> >>>>>> the properties of file. yearly is a .doc I wrote yearlya is the
> >>>>>> converted file. Both files a next to each other in folder. Reason
> >>>>>> for shorten path is for use on machines that do not load to C.
> >>>>>> Want program to look in folder.
> >>>>>> Thanks
> >>>>>> Private Sub optionbutton35_Click()
> >>>>>> OptionButton35.Value = False
> >>>>>> Dim Word As New Word.Application
> >>>>>> Dim WordDoc As Word.Document
> >>>>>> Word.Visible = True
> >>>>>> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
> >>>>>> End Sub
> >>>>>> Private Sub Optionbutton36_Click()
> >>>>>> OptionButton36.Value = False
> >>>>>> 'Call year
> >>>>>> Dim Word As New Word.Application
> >>>>>> Dim WordDoc As Word.Document
> >>>>>> Set Word = New Word.Application
> >>>>>> Word.Visible = True
> >>>>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
> >>>>>> Word.Visible = True
> >>>>>> end sub
> >>>>>>
> >>>>>> "Graham Mayor" wrote:
> >>>>>>
> >>>>>>> If you saved the rtf file as a Word Document then that's what it
> >>>>>>> now is.
> >>>>>>>
> >>>>>>> --
> >>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>>> Graham Mayor - Word MVP
> >>>>>>>
> >>>>>>> My web site www.gmayor.com
> >>>>>>> Word MVP web site http://word.mvps.org
> >>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>>>
> >>>>>>> Curt wrote:
> >>>>>>>> Have a rtf file saved as a word.doc no good for locate. No
> >>>>>>>> matter how I try to use this file code will not locate file.
> >>>>>>>> Is there a way to convert this file so it is a reconizable
> >>>>>>>> word.dco? It opens with word ok. I am useing office 2000.
> >>>>>>>> Thanks
>
>
>

Re: converting a file by Graham

Graham
Fri Nov 30 05:50:54 PST 2007

Let's have a re-think. Where exactly are you storing these documents? I can
see they are in a folder called parade, but where are your storing this
folder. e.g. set your install routine to use a specific folder such as a sub
folder of the startup folder. That will give you a start point no matter
where the start folder is locates on a particular pc. This gives you routine
somewhere to search from eg

File1 = Options.DefaultFilePath(wdStartupPath) & "\parade\yearly.doc"
Set WordDoc = Word.Documents.Open(File1)
and
file2 = Options.DefaultFilePath(wdStartupPath) & "\parade\yearlya.doc"
Set WordDoc = Word.Documents.Open(file2)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Curt wrote:
> Have tried what you suggested to no avail. I think I've tried every
> way I can think of to get it to find this file. on the 27 I did post
> my code each routine is opened from a option button on a user form.
> could the fact that yearlya was created in a newer version than I am
> useing be the culprit?
>
> "Graham Mayor" wrote:
>
>> When you open a document from a location other than the default
>> document location Word shifts focus to that folder for the purpose
>> of file > open, until you close Word or until you open a document
>> from another folder. Without having your document/code to verify,
>> once the first document is opened then the focus is moved to the
>> folder that contains it. So my conjecture was that if you change
>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
>> to
>> Set WordDoc = Word.Documents.Open("yearlya.doc")
>> the document may be found.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> Curt wrote:
>>> both documents are not open at same time. Each is opened from a
>>> userform seperatly. I have put yearlya into both code areas same
>>> results. Yearly opens but converted file cannot find. I don't follow
>>> how I cam remove the path from code and have any thing happen.
>>> Will keep experminting
>>> Thanks Again
>>>
>>> "Graham Mayor" wrote:
>>>
>>>> On further reflection try removing the path from the second
>>>> document. If it is opened from the same folder as the first the
>>>> path will be wrong.
>>>>
>>>> --
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>> Graham Mayor - Word MVP
>>>>
>>>> My web site www.gmayor.com
>>>> Word MVP web site http://word.mvps.org
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>
>>>> Graham Mayor wrote:
>>>>> I suspect it is more to do with the fact that once you have opened
>>>>> the first file, while Word remains open, the focus has moved from
>>>>> the default folder to the folder that contains the first document
>>>>> so that path would need to be from there or you would have to
>>>>> reset the path to its default before opening the second document.
>>>>>
>>>>>
>>>>> Curt wrote:
>>>>>> appreciate your responce. The path works on file I created
>>>>>> (yearly)not on converted (yearlya) in same folder also I've
>>>>>> learned that the converted file was created in office 2003 I am
>>>>>> useing 2000 this may be problem.
>>>>>> Thanks Again
>>>>>>
>>>>>> "Graham Mayor" wrote:
>>>>>>
>>>>>>> It won't work because you have not told the macro from where to
>>>>>>> start looking for the path. . You will need to ensure that your
>>>>>>> documents are filed with direct relationship to (say) the Word
>>>>>>> documents folder and adjust the relative path to suit in order
>>>>>>> for the command to find it.
>>>>>>> eg
>>>>>>> Dim WordDoc As Word.Document
>>>>>>> Dim ParadePath As String
>>>>>>> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
>>>>>>> Set WordDoc = Word.Documents.Open(ParadePath &
>>>>>>> "\parade\yearly.doc")
>>>>>>>
>>>>>>> --
>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>> Graham Mayor - Word MVP
>>>>>>>
>>>>>>> My web site www.gmayor.com
>>>>>>> Word MVP web site http://word.mvps.org
>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Curt wrote:
>>>>>>>> What I don't understand is why the following code will not find
>>>>>>>> this file. It will only find it if I use the complete path from
>>>>>>>> the properties of file. yearly is a .doc I wrote yearlya is the
>>>>>>>> converted file. Both files a next to each other in folder.
>>>>>>>> Reason for shorten path is for use on machines that do not
>>>>>>>> load to C. Want program to look in folder.
>>>>>>>> Thanks
>>>>>>>> Private Sub optionbutton35_Click()
>>>>>>>> OptionButton35.Value = False
>>>>>>>> Dim Word As New Word.Application
>>>>>>>> Dim WordDoc As Word.Document
>>>>>>>> Word.Visible = True
>>>>>>>> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
>>>>>>>> End Sub
>>>>>>>> Private Sub Optionbutton36_Click()
>>>>>>>> OptionButton36.Value = False
>>>>>>>> 'Call year
>>>>>>>> Dim Word As New Word.Application
>>>>>>>> Dim WordDoc As Word.Document
>>>>>>>> Set Word = New Word.Application
>>>>>>>> Word.Visible = True
>>>>>>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
>>>>>>>> Word.Visible = True
>>>>>>>> end sub
>>>>>>>>
>>>>>>>> "Graham Mayor" wrote:
>>>>>>>>
>>>>>>>>> If you saved the rtf file as a Word Document then that's what
>>>>>>>>> it now is.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>>>> Graham Mayor - Word MVP
>>>>>>>>>
>>>>>>>>> My web site www.gmayor.com
>>>>>>>>> Word MVP web site http://word.mvps.org
>>>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>>>>
>>>>>>>>> Curt wrote:
>>>>>>>>>> Have a rtf file saved as a word.doc no good for locate. No
>>>>>>>>>> matter how I try to use this file code will not locate file.
>>>>>>>>>> Is there a way to convert this file so it is a reconizable
>>>>>>>>>> word.dco? It opens with word ok. I am useing office 2000.
>>>>>>>>>> Thanks



Re: converting a file by Curt

Curt
Fri Nov 30 20:09:00 PST 2007

All files for program are in a folder on the desktop called (Parade) path
from properties of folder is C:\Documents and Settings\Curtiss A.
Greer\Desktop
all action takes place inside of folder parade.
A userform with option buttons to open is used to get to the files. The code
posted on the 27 shows code for both option buttons. Not trying to create an
install only open this file.(yearlya) I wrote a mocro in word contolled it
from excel it opened yearly then ran word macro opened yearlya then put
yearly on top. When you closed yearly yearlya was there. What I ened up with
was both files open. Think I am going to walk away till after Christmass.
This program did even with bugs pulled ths Vet's Day Parade out in order. No
one knew till after the parade about the snauff. Sure do appreciate all who
man this forum.
Thanks & Merry Christmass to All



Graham Mayor" wrote:

> Let's have a re-think. Where exactly are you storing these documents? I can
> see they are in a folder called parade, but where are your storing this
> folder. e.g. set your install routine to use a specific folder such as a sub
> folder of the startup folder. That will give you a start point no matter
> where the start folder is locates on a particular pc. This gives you routine
> somewhere to search from eg
>
> File1 = Options.DefaultFilePath(wdStartupPath) & "\parade\yearly.doc"
> Set WordDoc = Word.Documents.Open(File1)
> and
> file2 = Options.DefaultFilePath(wdStartupPath) & "\parade\yearlya.doc"
> Set WordDoc = Word.Documents.Open(file2)
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> Curt wrote:
> > Have tried what you suggested to no avail. I think I've tried every
> > way I can think of to get it to find this file. on the 27 I did post
> > my code each routine is opened from a option button on a user form.
> > could the fact that yearlya was created in a newer version than I am
> > useing be the culprit?
> >
> > "Graham Mayor" wrote:
> >
> >> When you open a document from a location other than the default
> >> document location Word shifts focus to that folder for the purpose
> >> of file > open, until you close Word or until you open a document
> >> from another folder. Without having your document/code to verify,
> >> once the first document is opened then the focus is moved to the
> >> folder that contains it. So my conjecture was that if you change
> >> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
> >> to
> >> Set WordDoc = Word.Documents.Open("yearlya.doc")
> >> the document may be found.
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >>
> >> Curt wrote:
> >>> both documents are not open at same time. Each is opened from a
> >>> userform seperatly. I have put yearlya into both code areas same
> >>> results. Yearly opens but converted file cannot find. I don't follow
> >>> how I cam remove the path from code and have any thing happen.
> >>> Will keep experminting
> >>> Thanks Again
> >>>
> >>> "Graham Mayor" wrote:
> >>>
> >>>> On further reflection try removing the path from the second
> >>>> document. If it is opened from the same folder as the first the
> >>>> path will be wrong.
> >>>>
> >>>> --
> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>> Graham Mayor - Word MVP
> >>>>
> >>>> My web site www.gmayor.com
> >>>> Word MVP web site http://word.mvps.org
> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>
> >>>> Graham Mayor wrote:
> >>>>> I suspect it is more to do with the fact that once you have opened
> >>>>> the first file, while Word remains open, the focus has moved from
> >>>>> the default folder to the folder that contains the first document
> >>>>> so that path would need to be from there or you would have to
> >>>>> reset the path to its default before opening the second document.
> >>>>>
> >>>>>
> >>>>> Curt wrote:
> >>>>>> appreciate your responce. The path works on file I created
> >>>>>> (yearly)not on converted (yearlya) in same folder also I've
> >>>>>> learned that the converted file was created in office 2003 I am
> >>>>>> useing 2000 this may be problem.
> >>>>>> Thanks Again
> >>>>>>
> >>>>>> "Graham Mayor" wrote:
> >>>>>>
> >>>>>>> It won't work because you have not told the macro from where to
> >>>>>>> start looking for the path. . You will need to ensure that your
> >>>>>>> documents are filed with direct relationship to (say) the Word
> >>>>>>> documents folder and adjust the relative path to suit in order
> >>>>>>> for the command to find it.
> >>>>>>> eg
> >>>>>>> Dim WordDoc As Word.Document
> >>>>>>> Dim ParadePath As String
> >>>>>>> ParadePath = Options.DefaultFilePath(wdDocumentsPath)
> >>>>>>> Set WordDoc = Word.Documents.Open(ParadePath &
> >>>>>>> "\parade\yearly.doc")
> >>>>>>>
> >>>>>>> --
> >>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>>> Graham Mayor - Word MVP
> >>>>>>>
> >>>>>>> My web site www.gmayor.com
> >>>>>>> Word MVP web site http://word.mvps.org
> >>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> Curt wrote:
> >>>>>>>> What I don't understand is why the following code will not find
> >>>>>>>> this file. It will only find it if I use the complete path from
> >>>>>>>> the properties of file. yearly is a .doc I wrote yearlya is the
> >>>>>>>> converted file. Both files a next to each other in folder.
> >>>>>>>> Reason for shorten path is for use on machines that do not
> >>>>>>>> load to C. Want program to look in folder.
> >>>>>>>> Thanks
> >>>>>>>> Private Sub optionbutton35_Click()
> >>>>>>>> OptionButton35.Value = False
> >>>>>>>> Dim Word As New Word.Application
> >>>>>>>> Dim WordDoc As Word.Document
> >>>>>>>> Word.Visible = True
> >>>>>>>> Set WordDoc = Word.Documents.Open("\parade\yearly.doc")
> >>>>>>>> End Sub
> >>>>>>>> Private Sub Optionbutton36_Click()
> >>>>>>>> OptionButton36.Value = False
> >>>>>>>> 'Call year
> >>>>>>>> Dim Word As New Word.Application
> >>>>>>>> Dim WordDoc As Word.Document
> >>>>>>>> Set Word = New Word.Application
> >>>>>>>> Word.Visible = True
> >>>>>>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
> >>>>>>>> Word.Visible = True
> >>>>>>>> end sub
> >>>>>>>>
> >>>>>>>> "Graham Mayor" wrote:
> >>>>>>>>
> >>>>>>>>> If you saved the rtf file as a Word Document then that's what
> >>>>>>>>> it now is.
> >>>>>>>>>
> >>>>>>>>> --
> >>>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>>>>> Graham Mayor - Word MVP
> >>>>>>>>>
> >>>>>>>>> My web site www.gmayor.com
> >>>>>>>>> Word MVP web site http://word.mvps.org
> >>>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>>>>>
> >>>>>>>>> Curt wrote:
> >>>>>>>>>> Have a rtf file saved as a word.doc no good for locate. No
> >>>>>>>>>> matter how I try to use this file code will not locate file.
> >>>>>>>>>> Is there a way to convert this file so it is a reconizable
> >>>>>>>>>> word.dco? It opens with word ok. I am useing office 2000.
> >>>>>>>>>> Thanks
>
>
>

Re: converting a file by Graham

Graham
Fri Nov 30 23:09:07 PST 2007

Your choice of a sub folder from the desktop makes the coding required to
obtain the true path rather more complicated, but after doing some digging
on the web, the following does the trick:

Option Explicit

Private Const CSIDL_DESKTOP = &H0
Private Type SHITEMID
cb As Long
abID As Byte
End Type
Private Type ITEMIDLIST
mkid As SHITEMID
End Type
Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _
(ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As
Long
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias _
"SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As
Long

Private Function GetSpecialfolder(CSIDL As Long) As String
Dim r As Long, Path$
Dim IDL As ITEMIDLIST
'Get the special folder
r = SHGetSpecialFolderLocation(100, CSIDL, IDL)
If r = 0 Then
'Create a buffer
Path$ = Space$(512)
'Get the path from the IDList
r = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal Path$)
'Remove the unnecessary chr$(0)'s
GetSpecialfolder = Left$(Path, InStr(Path, Chr$(0)) - 1)
Exit Function
End If
GetSpecialfolder = ""
End Function

Sub Test()
Word.Documents.Open (GetSpecialfolder(CSIDL_DESKTOP) & "\parade\yearly.doc")
Word.Documents.Open (GetSpecialfolder(CSIDL_DESKTOP) &
"\parade\yearlya.doc")
End Sub

I take no credit for the producing the code.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Curt wrote:
> All files for program are in a folder on the desktop called (Parade)
> path from properties of folder is C:\Documents and Settings\Curtiss A.
> Greer\Desktop
> all action takes place inside of folder parade.
> A userform with option buttons to open is used to get to the files.
> The code posted on the 27 shows code for both option buttons. Not
> trying to create an install only open this file.(yearlya) I wrote a
> mocro in word contolled it from excel it opened yearly then ran word
> macro opened yearlya then put yearly on top. When you closed yearly
> yearlya was there. What I ened up with was both files open. Think I
> am going to walk away till after Christmass. This program did even
> with bugs pulled ths Vet's Day Parade out in order. No one knew till
> after the parade about the snauff. Sure do appreciate all who man
> this forum.
> Thanks & Merry Christmass to All
>
>
>
> Graham Mayor" wrote:
>
>> Let's have a re-think. Where exactly are you storing these
>> documents? I can see they are in a folder called parade, but where
>> are your storing this folder. e.g. set your install routine to use a
>> specific folder such as a sub folder of the startup folder. That
>> will give you a start point no matter where the start folder is
>> locates on a particular pc. This gives you routine somewhere to
>> search from eg
>>
>> File1 = Options.DefaultFilePath(wdStartupPath) & "\parade\yearly.doc"
>> Set WordDoc = Word.Documents.Open(File1)
>> and
>> file2 = Options.DefaultFilePath(wdStartupPath) &
>> "\parade\yearlya.doc"
>> Set WordDoc = Word.Documents.Open(file2)
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> Curt wrote:
>>> Have tried what you suggested to no avail. I think I've tried every
>>> way I can think of to get it to find this file. on the 27 I did post
>>> my code each routine is opened from a option button on a user form.
>>> could the fact that yearlya was created in a newer version than I am
>>> useing be the culprit?
>>>
>>> "Graham Mayor" wrote:
>>>
>>>> When you open a document from a location other than the default
>>>> document location Word shifts focus to that folder for the purpose
>>>> of file > open, until you close Word or until you open a document
>>>> from another folder. Without having your document/code to verify,
>>>> once the first document is opened then the focus is moved to the
>>>> folder that contains it. So my conjecture was that if you change
>>>> Set WordDoc = Word.Documents.Open("\parade\yearlya.doc")
>>>> to
>>>> Set WordDoc = Word.Documents.Open("yearlya.doc")
>>>> the document may be found.
>>>>
>>>> --
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>> Graham Mayor - Word MVP
>>>>
>>>> My web site www.gmayor.com
>>>> Word MVP web site http://word.mvps.org
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>
>>>>
>>>> Curt wrote:
>>>>> both documents are not open at same time. Each is opened from a
>>>>> userform seperatly. I have put yearlya into both code areas same
>>>>> results. Yearly opens but converted file cannot find. I don't
>>>>> follow how I cam remove the path from code and have any thing
>>>>> happen.
>>>>> Will keep experminting
>>>>> Thanks Again
>>>>>
>>>>> "Graham Mayor" wrote:
>>>>>
>>>>>> On further reflection try removing the path from the second
>>>>>> document. If it is opened from the same folder as the first the
>>>>>> path will be wrong.
>>>>>>
>>>>>> --
>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>> Graham Mayor - Word MVP
>>>>>>
>>>>>> My web site www.gmayor.com
>>>>>> Word MVP web site http://word.mvps.org
>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>
>>>>>> Graham Mayor wrote:
>>>>>>> I suspect it is more to do with the fact that once you have
>>>>>>> opened the first file, while Word remains open, the focus has
>>>>>>> moved from the default folder to the folder that contains the
>>>>>>> first document so that path would need to be from there or you
>>>>>>> would have to reset the path to its default before opening the
>>>>>>> second document.
>>>>>>>
>>>>>>>
>>>>>>> Curt wrote:
>>>>>>>> appreciate your responce. The path works on file I created
>>>>>>>> (yearly)not on converted (yearlya) in same folder also I've
>>>>>>>> learned that the converted file was created in office 2003 I am
>>>>>>>> useing 2000 this may be problem.
>>>>>>>> Thanks Again
>>>>>>>>
>>>>>>>> "Graham Mayor" wrote:
>>>>>>>>
>>>>>>>>> It won't work because you have not told the macro from where
>>>>>>>>> to start looking for the path. . You will need to ensure that
>>>>>>>>> your documents are filed with direct relationship to (say)
>>>>>>>>> the Word documen