dear all
i am new to this forum ,i was writing a vb code and i need to display a saved word or exell file on a comand clike, but it replies me file not found. but my code can open a notepad.if any one can tell me the right code i would apreciate.

thanks in advance

Recommended Answers

All 7 Replies

There isn't really a way to do that in VB6

Hi,

Just Find the Path of "WINWORD.exe" (MS Office) normally found in
"Program Files\Microsoft Office\OFFICE" path
Shell sSQL, vbMaximizedFocus
and open like this :

Dim sSQL As String

sSQL = "C:\Program Files\Microsoft Office\OFFICE11\winword.exe C:\mydoc.doc"
Shell sSQL, vbMaximizedFocus


Regards
Veena

dear veena
it works thank you so much

Yes but using Shell on Microsoft word is ram intensive and it is bad programming.

hi paul

i realy dont understand it ,what do you mean by ram intensive ,bad programming? can you please tell me the side effect of using shell in microsoft word clearly ?

thank you

Yes but using Shell on Microsoft word is ram intensive and it is bad programming.

hi paul

i realy dont understand it ,what do you mean by ram intensive ,bad programming? can you please tell me the side effect of using shell in microsoft word clearly ?

thank you

Hi Firehiwot,

Actually, i have not come across any major Disadvantages of using "Shell" in VB6.
We have used it in many of our projects, without any complaints from our Clients.
Go ahead and use it.

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.