|
-
Sep 26th, 2000, 11:19 AM
#1
Thread Starter
Addicted Member
I have used the following codes in a VB6.0 program to call Winword.exe to open a word document but, to my surprise, they work quite well in my source codes directory (without any spaces in between) but after compiled and published and installed into the default directory C:\Program Files\¡* (with a space in between)
strWordDir = ¡°C:\Program Files\Microsoft Office\Office¡±
strDocFile = App.Path & ¡°\MyFile.doc¡±
Shell strWordDir & ¡°\Winword.exe ¡° & strDocFile, vbMaximizedFocus
The result of running the above codes is Word¡¯s report:
Can¡¯t find the files Program.doc and Files\¡*\MyFile.doc
(Presented in two separate DialogBoxes)
It seems that my codes in the new directory (with a space) now uses the space as a separator for two document files. Can anyone tell me why and how to improve?
-
Sep 26th, 2000, 12:10 PM
#2
_______
<?>
'you could try this on your string
'replace function in VB6
'find an instance and replace it with another
''
string1 = "my name is somewhere to be found!"
string2 = Replace(string1, " ", "")
'String1 is now "mynameissomewheretobefound!"
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 26th, 2000, 03:09 PM
#3
Thread Starter
Addicted Member
Thanks
Hi, HeSaidJoe,
You do have an interesting name. Why HeSaidJoe? Why not IHailJoe?
I'll certainly try your suggestion which I believe most effective. I am looking forward to the result. When the result comes out, I'll write to you again.
Thank you very much.
Best wishes.
IHailJoe --xmin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|