SHFDEV
asked on
VB 6 + MS Word
Hi All
I have used the following shellExecute API to open/Excel MS Excel files and it works fine. But for MS Word problem occurs.
I want to open MS Word document through VB 6.0 and i am using shellExecute API
sub command1_click()
Rtn = ShellExecute(frmName.hwnd, "Open", "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EX E" , " C:\Program Files\Proj\sheets\DocName. doc", "", 5)
end sub
when i click the command1 button then word document DocName.doc opens. that's fine. again when i click the command1 button then same document which was already opend is shown.But I want to to open multiple instances of the same document. If i click command1 button 5 times then 5 instances are required.
and 4 out of 5 will be read only,it is acceptable.
Thanks and Regards
Basharat
I have used the following shellExecute API to open/Excel MS Excel files and it works fine. But for MS Word problem occurs.
I want to open MS Word document through VB 6.0 and i am using shellExecute API
sub command1_click()
Rtn = ShellExecute(frmName.hwnd,
end sub
when i click the command1 button then word document DocName.doc opens. that's fine. again when i click the command1 button then same document which was already opend is shown.But I want to to open multiple instances of the same document. If i click command1 button 5 times then 5 instances are required.
and 4 out of 5 will be read only,it is acceptable.
Thanks and Regards
Basharat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Jaax & angellll
Thanx for replying.
Rtn = ShellExecute(frmName.hwnd, "Open", "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EX E" , " C:\Program Files\Proj\sheets\DocName. doc", "Doc1", 5)
Above statement dosn't work for opening multiple instances of the same file. Although single instance opens successfully.
However angelll's suggested solutuion works fine but we are interested in obtaining our objective through ShellExecute because our all other applications are openning by Shell Execute. We want to maintain our symmetry.
Thanx for replying.
Rtn = ShellExecute(frmName.hwnd,
Above statement dosn't work for opening multiple instances of the same file. Although single instance opens successfully.
However angelll's suggested solutuion works fine but we are interested in obtaining our objective through ShellExecute because our all other applications are openning by Shell Execute. We want to maintain our symmetry.
ASKER
Hi every body
I m pasting the same question again.....
I want to open MS Word document through VB 6.0 and i am using shellExecute API
sub command1_click()
Rtn = ShellExecute(frmName.hwnd, "Open", "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EX E" , " C:\Program Files\Proj\sheets\DocName. doc", "", 5)
end sub
When i click the command1 button then word document DocName.doc opens. that's fine. again when i click the command1 button then same document which was already opend is shown.But I want to to open multiple instances of the same document. If i click command1 button 5 times then 5 instances should open separately and then obviously close separately. Our requirement is that 4 out of that 5 instances should be read only ?
It should be noted that same API works fine for opening multiple instances of MSExcel documents.
Regards
Imi
I m pasting the same question again.....
I want to open MS Word document through VB 6.0 and i am using shellExecute API
sub command1_click()
Rtn = ShellExecute(frmName.hwnd,
end sub
When i click the command1 button then word document DocName.doc opens. that's fine. again when i click the command1 button then same document which was already opend is shown.But I want to to open multiple instances of the same document. If i click command1 button 5 times then 5 instances should open separately and then obviously close separately. Our requirement is that 4 out of that 5 instances should be read only ?
It should be noted that same API works fine for opening multiple instances of MSExcel documents.
Regards
Imi
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In
>Rtn = ShellExecute(frmName.hwnd,
try providing a title as in
Rtn = ShellExecute(frmName.hwnd,