SOLVED : Need help with an old VB application
SOLVED : Need help with an old VB application
Hi,
i'm not new with wine but i'm in trouble with an old vb application.
I just tried everything i know to solve but i'm still at the start point.
I want to open a document (.rtf or .doc ) with OO . This VB application needs the full path of the application i want to use to open the documents. I write down the complete and full path ( Z:/xxx/yy/oowriter ).
The path is correct and the Writer opens quickly but with an error message like "/C:/Programs/xxx/yyy/1.RTF does not exist"
I think the application use some " Shell (application,document) " to open the docs.
What can i do in this case ? I think winepath or other registry tricks cannot apply.
Please i need help, i've just spent many ours without results.
Thank you
i'm not new with wine but i'm in trouble with an old vb application.
I just tried everything i know to solve but i'm still at the start point.
I want to open a document (.rtf or .doc ) with OO . This VB application needs the full path of the application i want to use to open the documents. I write down the complete and full path ( Z:/xxx/yy/oowriter ).
The path is correct and the Writer opens quickly but with an error message like "/C:/Programs/xxx/yyy/1.RTF does not exist"
I think the application use some " Shell (application,document) " to open the docs.
What can i do in this case ? I think winepath or other registry tricks cannot apply.
Please i need help, i've just spent many ours without results.
Thank you
Last edited by ccxx on Wed Oct 15, 2008 6:29 am, edited 1 time in total.
Need help with an old VB application
ccxx wrote:
OpenOffice.org. You need to create a drive where the file actually
exists on your system. Look at the Winecfg program on how to do this.
BTW, why are you using the Windows version of OpenOffice.org? I know it
exists for many Linux distributions, Solaris and MacOSX.
James McKenzie
Your application is making an assumption when handing off the path theHi,
i'm not new with wine but i'm in trouble with an old vb application.
I just tried everything i know to solve but i'm still at the start point.
I want to open a document (.rtf or .doc ) with OO . This VB application needs the full path of the application i want to use to open the documents. I write down the complete and full path ( Z:/xxx/yy/oowriter ).
The path is correct and the Writer opens quickly but with an error message like "/C:/Programs/xxx/yyy/1.RTF does not exist"
I think the application use some " Shell (application,document) " to open the docs.
What can i do in this case ? I think winepath or other registry tricks cannot apply.
OpenOffice.org. You need to create a drive where the file actually
exists on your system. Look at the Winecfg program on how to do this.
BTW, why are you using the Windows version of OpenOffice.org? I know it
exists for many Linux distributions, Solaris and MacOSX.
James McKenzie
Re: Need help with an old VB application
I'm using OO for Linux version.James McKenzie wrote:ccxx wrote:
BTW, why are you using the Windows version of OpenOffice.org? I know it
exists for many Linux distributions, Solaris and MacOSX.
James McKenzie
I maked an error writing the path. It's "Z:\usr\bin\oowriter" not "Z:/usr/bin/oowriter"
I'm sorry.
Going to try something with Winecfg ... What ? I don't know

Thank you all for your answers
Re: Need help with an old VB application
Have you looked at this?ccxx wrote: I'm using OO for Linux version.
http://wiki.winehq.org/FAQ#head-68d921c ... 58d76ff51f
Re: Need help with an old VB application
Absolutely yes !dimesio wrote:Have you looked at this?ccxx wrote: I'm using OO for Linux version.
http://wiki.winehq.org/FAQ#head-68d921c ... 58d76ff51f
Regarding the 2.3, Open office starts regular but it can not found the file.
Regarding the 2.4 i think it does not apply to this case because the application calls OO Writer passing the file name of the document like a parameter of the command line ( like "Z:\usr\bin\oowriter C:\Programs\xxx\yyy\1.RTF "
A question : why OO give to me a message where the path of the document is "/C:/Programs/xxx/yyy/1.RTF" and not "C:\Programs\xxx\yyy\1.RTF" ?
Thank you
Re: Need help with an old VB application
That's exactly what FAQ 2.4 is all about - calling Linux application from Wine and passing it a file to open.ccxx wrote:Regarding the 2.4 i think it does not apply to this case because the application calls OO Writer passing the file name of the document like a parameter of the command line ( like "Z:\usr\bin\oowriter C:\Programs\xxx\yyy\1.RTF "
You have to use "winepath" program to translate paths between windows and unix paths. Windows programs obviously use windows paths. You can't give them to unix programs.ccxx wrote:A question : why OO give to me a message where the path of the document is "/C:/Programs/xxx/yyy/1.RTF" and not "C:\Programs\xxx\yyy\1.RTF" ?
Re: Need help with an old VB application
The Faq 2.4 is about how to associate some Linux program with a file type in Wine. If my application does a shell to call the .doc, 2.4 is the solution.vitamin wrote:That's exactly what FAQ 2.4 is all about - calling Linux application from Wine and passing it a file to open.ccxx wrote:Regarding the 2.4 i think it does not apply to this case because the application calls OO Writer passing the file name of the document like a parameter of the command line ( like "Z:\usr\bin\oowriter C:\Programs\xxx\yyy\1.RTF "
Whereas my application call OO with the .doc file like a parameter, i think the 2.4 does not apply in my case.
Infact Wine does not know what type of file my application is calling because it's OO that will open the .doc.
But if i'm on the wrong way, I apologize ......
You have to use "winepath" program to translate paths between windows and unix paths. Windows programs obviously use windows paths. You can't give them to unix programs.[/quote]ccxx wrote:A question : why OO give to me a message where the path of the document is "/C:/Programs/xxx/yyy/1.RTF" and not "C:\Programs\xxx\yyy\1.RTF" ?
I readed something about "winepath" but i don't understand how to apply it in this case. I can write only the full path of the OOWriter whithout spaces .
At this point i think there is not a solution ... but it's stupid.
Thank you for your answer
I think i can't explain as well , but i solved with a few line of code.
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal IpOperation As String, ByVal IpFile As String, ByVal IpParameters As String, ByVal IpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_NORMAL = 1
Sub Main()
Dim X As Long
X = ShellExecute(hWnd, "Open", Command$, vbNullString, vbNullString, SW_NORMAL)
End Sub
This routine take the name of the .doc file and call it directly.
In this case the registry key plays a role ( applyng the faq 2.4 ) because the shell
Thank you all for your suggest
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal IpOperation As String, ByVal IpFile As String, ByVal IpParameters As String, ByVal IpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_NORMAL = 1
Sub Main()
Dim X As Long
X = ShellExecute(hWnd, "Open", Command$, vbNullString, vbNullString, SW_NORMAL)
End Sub
This routine take the name of the .doc file and call it directly.
In this case the registry key plays a role ( applyng the faq 2.4 ) because the shell
Thank you all for your suggest