From: Viper900 on
Hi
What di I have to change about this line of code so that it can open wordpad
files.

Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus

thanks you


From: Norm on
Viper900 formulated the question :
> Hi
> What di I have to change about this line of code so that it can open wordpad
> files.
>
> Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus
>
> thanks you

This works for me:

Shell "notepad.exe " & App.Path & "\Help.txt", vbNormalNoFocus

Norm


From: Helmut Meukel on
"Viper900" <Viper900(a)discussions.microsoft.com> schrieb im Newsbeitrag
news:D7D2133B-412B-44B8-B2B7-98575364F207(a)microsoft.com...
> Hi
> What di I have to change about this line of code so that it can open wordpad
> files.
>
> Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus
>
> thanks you
>

Where to begin with?

> ...so that it can open wordpad files.
- do you really want to use Notepad to open Wordpad files?
Or do you mean it should start Wordpad?
- You used plural (files), so using a literal for the filename
("\IndexHelp.txt") is a bad idea. You should use a variable
instead.
- 'wordpad files': what do you mean using this term? If no other
word processing program is installed (MS Word, Corel Write,
...) then Wordpad is associated at least with .doc, .rtf, .wri.
Which of these do you want to open?

> Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus
- Why did you use a plus sign instead of an ampersand?

- This may be a long shot, but does "IndexHelp.txt" contain a list of
files that can be displayed and the user can select which of these help
topic files your program should show? Is this your goal and you
don't know how to achieve it?

Helmut.

From: Viper900 on
Sorry
I should have explained myself better. I am making a help file for a program
that i am writing, as notepad does'nt want to work with pictures, i changed
it to wordpad. and used this:

Shell" wordpad.exe" & App.path +"\Indexhelp.rtf",vbnormal focus

btw that line won't work

Is that better
Thanks

"Helmut Meukel" wrote:

> "Viper900" <Viper900(a)discussions.microsoft.com> schrieb im Newsbeitrag
> news:D7D2133B-412B-44B8-B2B7-98575364F207(a)microsoft.com...
> > Hi
> > What di I have to change about this line of code so that it can open wordpad
> > files.
> >
> > Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus
> >
> > thanks you
> >
>
> Where to begin with?
>
> > ...so that it can open wordpad files.
> - do you really want to use Notepad to open Wordpad files?
> Or do you mean it should start Wordpad?
> - You used plural (files), so using a literal for the filename
> ("\IndexHelp.txt") is a bad idea. You should use a variable
> instead.
> - 'wordpad files': what do you mean using this term? If no other
> word processing program is installed (MS Word, Corel Write,
> ...) then Wordpad is associated at least with .doc, .rtf, .wri.
> Which of these do you want to open?
>
> > Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus
> - Why did you use a plus sign instead of an ampersand?
>
> - This may be a long shot, but does "IndexHelp.txt" contain a list of
> files that can be displayed and the user can select which of these help
> topic files your program should show? Is this your goal and you
> don't know how to achieve it?
>
> Helmut.
>
> .
>
From: Norm on
Viper900 presented the following explanation :
> Sorry
> I should have explained myself better. I am making a help file for a program
> that i am writing, as notepad does'nt want to work with pictures, i changed
> it to wordpad. and used this:
>
> Shell" wordpad.exe" & App.path +"\Indexhelp.rtf",vbnormal focus
>
> btw that line won't work
>
> Is that better
> Thanks
>
> "Helmut Meukel" wrote:
>
>> "Viper900" <Viper900(a)discussions.microsoft.com> schrieb im Newsbeitrag
>> news:D7D2133B-412B-44B8-B2B7-98575364F207(a)microsoft.com...
>>> Hi
>>> What di I have to change about this line of code so that it can open
>>> wordpad files.
>>>
>>> Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus
>>>
>>> thanks you
>>>
>>
>> Where to begin with?
>>
>>> ...so that it can open wordpad files.
>> - do you really want to use Notepad to open Wordpad files?
>> Or do you mean it should start Wordpad?
>> - You used plural (files), so using a literal for the filename
>> ("\IndexHelp.txt") is a bad idea. You should use a variable
>> instead.
>> - 'wordpad files': what do you mean using this term? If no other
>> word processing program is installed (MS Word, Corel Write,
>> ...) then Wordpad is associated at least with .doc, .rtf, .wri.
>> Which of these do you want to open?
>>
>>> Shell "notepad.exe " & App.Path + "\IndexHelp.txt", vbNormalFocus
>> - Why did you use a plus sign instead of an ampersand?
>>
>> - This may be a long shot, but does "IndexHelp.txt" contain a list of
>> files that can be displayed and the user can select which of these help
>> topic files your program should show? Is this your goal and you
>> don't know how to achieve it?
>>
>> Helmut.
>>
>> .
>>

I am really confused about what it is that you are trying to do. Are
you trying to open a help file from within your program? If so and you
are using a rtf file, why not just open it in a RichTextBox?

Are you pasting your code into your questions are typing it? As Helmut
said why are you using a plus instead of an ampersand. You are showing
a space in the wrong place in your example, which is why I posted what
worked for me in my first response. Try this:

Shell "wordpad.exe " & App.path & "\Indexhelp.rtf", vbnormal focus

Note where the spaces are.

Norm