![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I'd like to open a text file for viewing by launching it's associated filetype application. Windows registry default for txt files is Pocket Word, however I can't figure out how to open a txt file to pword.exe via B4P.
These two commands will open a pwd file: Shell(pword.exe, "-opendoc \temp\readme.pwd") Shell(pword.exe, "\temp\readme.pwd") However using a txt extension instead fails. Word opens, but errors with "A problem with the document was encountered and it cannot be opened". I can double-click the same txt file in Explorer and it opens properly in Word. I suspect there's another attribute for opening non-native formats? Searching the Web has failed me.
__________________
Regards, Mike PPC Cingular 8525 WM5 4Gb SD |
|
||||
|
I believe You should only shell the file(.txt,.doc, etc) itself as the known associated app will automatically be started...
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
|||
|
Cableguy - I seem to be able to shell the file itself only on the PC. On the PDA it does nothing, no error, no anything. I even confirmed that shell command is being exectued shell("myfile.txt","") and shell("myfile.txt") does nothing.
specci48 - can you please confirm or provide the shell command you used? I don't understand what could be different if you can open these file types and I cannot. Looks like I have the standard txt file extension type leading to pword.exe in the registry, but I can't open it. Thanks guys!
__________________
Regards, Mike PPC Cingular 8525 WM5 4Gb SD |
|
||||
|
If you can open a .doc file by tapping it, ten shelling should work, I would suggest you to use a regestry editor and browse the extension association keys to see if they are correct...
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
|||
|
Cableguy,
I have done that from the beginning. I suspect if there was a problem with registry association then perhaps I should be able to shell to some other file type, but so far trying to open files like pdf, ppt, doc, txt, htm, jpg, mp3 directly via Shell all fail, yet I can click on them in Explorer and their respective application launches and opens the file. Using the .txt file type as an example, I have the following in the registry: HKEY_CLASSES_ROOT\.txt >> default = txtfile so then if I go to txtfile: HKEY_CLASSES_ROOT\txtfile\Shell\Open\Command >> default = pword.exe %1 and also HHKEY_CLASSES_ROOT\txtfile\Shell\OpenDoc\Command >> default = pword.exe -opendoc %1 Could you please verify you have these values? And you are able to launch, say a text file call test.txt in \temp folder: Shell("\temp\test.txt") or Shell("\temp\test".txt,"") (figure one of these would work) and this will open pword with the contents of test.txt? If so man I'm stumped. Wonder if Resco Explorer could have anything to do with it? It's a pretty powerful Explorer replacement and, lack of any other suspect, wonder if it could be doing some reassigning? Appreciate the continued assistance!!
__________________
Regards, Mike PPC Cingular 8525 WM5 4Gb SD |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Upload text file | aerohost | Questions & Help Needed | 2 | 06-17-2008 06:37 PM |
| Button Control text label word wrap | TWELVE | Basic4ppc Wishlist | 0 | 06-04-2008 06:55 AM |
| file open question | scott93727 | Questions & Help Needed | 4 | 05-30-2008 10:07 AM |
| Automatically Open Pword With A Word File | sintaq | Questions & Help Needed | 3 | 03-26-2008 03:31 PM |
| How to achieve text edtion like in word? | Cableguy | Questions & Help Needed | 3 | 07-03-2007 04:52 PM |