| View previous topic :: View next topic |
| Author |
Message |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Tue Jan 03, 2006 11:05 pm Post subject: Viewing Documents without main program? |
|
|
Anyone any ideas on how to get the source, text etc from a Word Document
instead of getting:
ÐÏࡱá
I would like to get the entire contents, i know other editing programs can do it without have the program eg. Word installed. Is there anyway to do this via, api, dll, vds?
Nathan |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Jan 03, 2006 11:42 pm Post subject: |
|
|
have you thought of using string.dll? it will enable you to remove just about everything that is not alphanumeric and then be left with just plain text
serge _________________
|
|
| Back to top |
|
 |
henrywood Contributor

Joined: 21 Sep 2004 Posts: 66 Location: Copenhagen, Denmark
|
Posted: Wed Jan 04, 2006 12:28 am Post subject: |
|
|
Assuming that Gadget's COM functionality is actually complete, I think you may use it to access the COM interfaced exposed by Word
At least I managed to do so in PHP once (also by using COM) |
|
| Back to top |
|
 |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Wed Jan 04, 2006 10:48 am Post subject: |
|
|
Dreads string.dll can load a MS Word Document but only gives you:
ÐÏࡱá and the rest of the document is not loaded.
I have also tried tommys VDSLIST, VDSOBJ
Nathan |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Wed Jan 04, 2006 12:58 pm Post subject: |
|
|
| Maybe using either the vdsbrowser extension or vdssurfx load the word document in there and try to copy the text from there? |
|
| Back to top |
|
 |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Wed Jan 04, 2006 3:10 pm Post subject: |
|
|
Tried that Marty, but it wants to download it if you do not have word installed !
Nathan |
|
| Back to top |
|
 |
henrywood Contributor

Joined: 21 Sep 2004 Posts: 66 Location: Copenhagen, Denmark
|
Posted: Wed Jan 04, 2006 10:11 pm Post subject: |
|
|
Oops !
Using the COM interface exposed by Word of course requires Word to be locally installed, so I guess that my suggestion about using COM is not feasible, judging by the subject of the post
Henrik |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Jan 05, 2006 3:12 am Post subject: |
|
|
Hi All,
You do not need to have MS Word to read a Word *.doc file. All document files are actually a structured storage files. They all use the IStorage and IStream interfaces to store data in the file. Take a look at the StgCreateDocfile and StgOpenStorage win32 API functions at http://msdn.microsoft.com Sorry I can't help any more than this since this is the subject of a DSU that I will be building for my GadgetX.dll _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Mon Jan 09, 2006 12:44 pm Post subject: |
|
|
An easier solution is to use WordView from Microsoft. It allows you to view Word documents without requiring the Word application. No doubt you'll then be able to extract the /text/ from that.
Do a search for wdviewer.exe on Microsoft's site _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Mon Jan 09, 2006 3:53 pm Post subject: |
|
|
Hi Accray
I do not wish to use word viewer for the following two reasons:
The overhead is 11.7Mb
and it has to be installed on the users system
All i am looking to do is get the contents of a word document into a vds var.
Nathan |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Jan 09, 2006 6:12 pm Post subject: |
|
|
What do you want to do with the contents?
Do you need to retain any graphics or visable table lines?
If it's just the text you need, vdsobj.dll can load a word doc and extract the text. |
|
| Back to top |
|
 |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Mon Jan 09, 2006 7:24 pm Post subject: |
|
|
Tried that,
it loads the doc file but only displasys:
ÐÏࡱá
I really need this functionality, so if someone can compile a dsu, dll, code i would be forever gratful and i will give them a free copy of Link Spider, GraFX, Pixy Professional, JavaKING and another two programs i will release soon.
Nathan |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Jan 09, 2006 11:54 pm Post subject: |
|
|
Since WORDPAD is on all Windows Computers
This might help for now:
| Code: | # Set Max seconds to wait for Wordpad to load
%%MaxWait = 5
# Get location of Worpad.exe On XP it returns
# "C:\Program Files\Windows NT\Accessories\WORDPAD.EXE" "%1"
%W = @regread(ROOT,rtffile\shell\open\command,,)
# Get string between first 2 quotes
Option fieldsep,@chr(34)
parse "%W;",%W
Option fieldsep,"|"
DIALOG CREATE,MSWord to Var,-1,0,500,400
DIALOG ADD,LIST,LIST1,6,6,489,355
DIALOG ADD,BUTTON,Open,373,8,64,20,Open
DIALOG ADD,EDIT,EDIT1,374,89,406,19
DIALOG SHOW
:Evloop
%%sec = 0
wait event
goto @event()
:OpenBUTTON
List clear,List1
%%File = @filedlg()
Dialog set,Edit1,%%File
runh @chr(34)%W@chr(34) @chr(34)%%File@chr(34)
While @not(@winexists(@Name(%%File).@ext(%%File) - WORDPAD))
wait 1
%%sec = @succ(%%sec)
If @equal(%%sec,%%MaxWait)
warn Operation failed!
exit
End
Wend
window send,@Name(%%File).@ext(%%File) - WORDPAD,@ctrl(A)@ctrl(C)
%%TextInVar = @CLIPBRD()
List assign,List1,%%TextInVar
window close,@Name(%%File).@ext(%%File) - WORDPAD
goto evloop
:Close
exit |
Hope this helps
Aslan |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Jan 10, 2006 7:36 am Post subject: |
|
|
Why not do a search for "Word to text converter" on Google or something like that?
There are command-line tools out there....
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Tue Jan 10, 2006 8:49 am Post subject: |
|
|
Also tried google, shareware sites etc.
I can't find any freeware command line tools to convert doc to txt, cheapest is $30 and dearest was $540 for one license.
I would be willing to pay $50 for a vds wrapper, dll, dsu package that can do it !
Nathan  |
|
| Back to top |
|
 |
|