- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I tried using systemqq to launch winword, as follows:
l4 = systemqq('winword c:myfile.doc')
Apparently no success, as winword is not launched. However,
l4 is returned as .TRUE.
Was ist los?
LKD
l4 = systemqq('winword c:myfile.doc')
Apparently no success, as winword is not launched. However,
l4 is returned as .TRUE.
Was ist los?
LKD
コピーされたリンク
10 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
winword would have to be in your PATH to make this work.
Have you considered the ShellExecute API routine? You could use it to "open" the document. I have used this many times with great success. It will automatically open the document using the default associated with the file type, including web pages!
Steve
Have you considered the ShellExecute API routine? You could use it to "open" the document. I have used this many times with great success. It will automatically open the document using the default associated with the file type, including web pages!
Steve
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Ah yes, the path. Actually, I did use the complete path, but still no luck. I still can't figure out why winword is not launched. However, your suggestion to use ShellExecute is a much better idea, and I will try it later today.
lkd
P.. If I weren't already using CVF, I would certainly buy it based on the great support!
lkd
P.. If I weren't already using CVF, I would certainly buy it based on the great support!
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
If the complete path had spaces in it, you would need to enclose the path in "".
Steve
Steve
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Tried ShellExecute today. Here is the command I used:
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN", "c:2maxents.DOC", " ", " ", %VAL(0) )
i4 = 31 upon return. (No association for this file extension). I'm running all this under Win2000. I checked my associations. Indeed DOC is registered to Word.
What should I do next to figure out what the real problem is?
lkd
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN", "c:2maxents.DOC", " ", " ", %VAL(0) )
i4 = 31 upon return. (No association for this file extension). I'm running all this under Win2000. I checked my associations. Indeed DOC is registered to Word.
What should I do next to figure out what the real problem is?
lkd
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
ShellExecute is a Win32 routine, so all strings must be C strings - for example, "OPEN"C.
Steve
Steve
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Yes, and so my MSDN documentation said. This was my first attempt:
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN"C, "c:2maxents.DOC"C, " "C, " "C, %VAL(0) )
Returned i4 = 2 (File not found).
And my third attempt, assuming that I couldn't pass a null-terminated string in such an implicit way, was this:
str1 = "OPEN"C
str2 = "c:2maxents.DOC"C
str3 = ""C
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), str1, str2, str3, str3, %VAL(0) )
Returned i4 = 2 as above.
Question remains: Do you have any hints for debugging this?
lkd
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN"C, "c:2maxents.DOC"C, " "C, " "C, %VAL(0) )
Returned i4 = 2 (File not found).
And my third attempt, assuming that I couldn't pass a null-terminated string in such an implicit way, was this:
str1 = "OPEN"C
str2 = "c:2maxents.DOC"C
str3 = ""C
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), str1, str2, str3, str3, %VAL(0) )
Returned i4 = 2 as above.
Question remains: Do you have any hints for debugging this?
lkd
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
This works
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN"C, "2maxents.DOC"C, ""C, "c:"C, %VAL(0) )
This does not work
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN"C, "c:2maxents.DOC"C, ""C, ""C, %VAL(0) )
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN"C, "2maxents.DOC"C, ""C, "c:"C, %VAL(0) )
This does not work
i4 = ShellExecute( GetHWndQQ(QWIN$FRAMEWINDOW), "OPEN"C, "c:2maxents.DOC"C, ""C, ""C, %VAL(0) )
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
LSD,
Your real problem is the backlash in the -string. "2" is a correct escape sequence in a -string and has the decimal value 2.
You should use a double backlash in the string: "I:2maxents.DOC"I
Gnus
Your real problem is the backlash in the -string. "2" is a correct escape sequence in a -string and has the decimal value 2.
You should use a double backlash in the string: "I:2maxents.DOC"I
Gnus
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
LKD,
Sorry for the prior message. I misused the Spell Check.
Your real problem is the backslash in the C-string. "2" is a correct escape sequence in a C-string and has the decimal value 2.
You should use a double backslash in the string: "C:2maxents.DOC"C
Guus
Sorry for the prior message. I misused the Spell Check.
Your real problem is the backslash in the C-string. "2" is a correct escape sequence in a C-string and has the decimal value 2.
You should use a double backslash in the string: "C:2maxents.DOC"C
Guus
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks Guus, that was EXACTLY the problem!
lkd
lkd