tWord Class
-
- Posts: 310
- Joined: Mon Oct 10, 2005 5:10 am
tWord Class
Hi
Can anyone point me to where I can download tWord class or send me a copy.
Regards
Colin
Can anyone point me to where I can download tWord class or send me a copy.
Regards
Colin
Re: tWord Class
Hello Colin,
what word version do you plan to work with?
Best regards,
Otto
what word version do you plan to work with?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
-
- Posts: 310
- Joined: Mon Oct 10, 2005 5:10 am
Re: tWord Class
Hi Otto
I am using Word 2003.
Regards
Colin
I am using Word 2003.
Regards
Colin
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: tWord Class
kind regards
Stefan
Stefan
-
- Posts: 310
- Joined: Mon Oct 10, 2005 5:10 am
Re: tWord Class
Hi Stefan
I tried both twordx.prg and tword2.prg but in both cases it does not work but I
am using FWH 7.12 and xHarbour build 1.0.0 which are both quite old - do I need
to update to use Tword.
Thanks
Colin
I tried both twordx.prg and tword2.prg but in both cases it does not work but I
am using FWH 7.12 and xHarbour build 1.0.0 which are both quite old - do I need
to update to use Tword.
Thanks
Colin
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: tWord Class
Hi Colin,
TWord is dated from 2003 / 2006, it should work with older versions of fwh.
I didn´t use it in my apps,but the sample is working here. What error do you get ?
Maybe there differences in the commands word uses. I´m not sure if it´s working with Office 2003 or 2007.
TWord is dated from 2003 / 2006, it should work with older versions of fwh.
I didn´t use it in my apps,but the sample is working here. What error do you get ?
Maybe there differences in the commands word uses. I´m not sure if it´s working with Office 2003 or 2007.
kind regards
Stefan
Stefan
-
- Posts: 310
- Joined: Mon Oct 10, 2005 5:10 am
Re: tWord Class
Stefan
This is the error using twordx.prg
Path and name: C:\dev\wca\wca.exe (32 bits)
Size: 2,328,576 bytes
Time from start: 0 hours 0 mins 7 secs
Error occurred at: 19/05/2009, 21:55:36
Error description: Error BASE/1004 Class: 'NIL' has no exported method: GET
Args:
[ 1] = U
[ 2] = C Documents
Stack Calls
===========
Called from: tget.prg => GET(0)
Called from: Twordx.prg => TWORD:OPENDOC(376)
Called from: report7.prg => REPORT7(13)
Called from: Main.prg => (b)MAINMENU(149)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: Main.prg => MAIN(92)
I am trying to open an existing word 2003 document.
Cheers
Colin
This is the error using twordx.prg
Path and name: C:\dev\wca\wca.exe (32 bits)
Size: 2,328,576 bytes
Time from start: 0 hours 0 mins 7 secs
Error occurred at: 19/05/2009, 21:55:36
Error description: Error BASE/1004 Class: 'NIL' has no exported method: GET
Args:
[ 1] = U
[ 2] = C Documents
Stack Calls
===========
Called from: tget.prg => GET(0)
Called from: Twordx.prg => TWORD:OPENDOC(376)
Called from: report7.prg => REPORT7(13)
Called from: Main.prg => (b)MAINMENU(149)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: Main.prg => MAIN(92)
I am trying to open an existing word 2003 document.
Cheers
Colin
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: tWord Class
Colin,
it seems, that ::oWord is still nil, maybe the ole connection failed.
Please replace the Method New () with this one to be sure that ::oWord is initialized:
it seems, that ::oWord is still nil, maybe the ole connection failed.
Please replace the Method New () with this one to be sure that ::oWord is initialized:
Code: Select all
METHOD NEW() CLASS TWord
::lWord := .T.
TRY
::oWord := GetActiveObject( "Word.Application" )
CATCH
TRY
::oWord := CreateObject( "Word.Application" )
CATCH
Alert( "ERROR! Word is not installed on this PC. [" + Ole2TxtError()+ "]" )
::lWord := .F.
END
END
RETURN( Self )
kind regards
Stefan
Stefan
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: tWord Class
Colin,
I made some tests and I found the problem.
The method OpenDoc (cNombre) needs the filename with its full path to work correctly.
Hope it helps
I made some tests and I found the problem.
The method OpenDoc (cNombre) needs the filename with its full path to work correctly.
Code: Select all
oWord := TWord():New()
//oWord:NewDoc('Creswin.doc') // not working !
oWord:OpenDoc ("d:\xbase\xharbour\tword\Creswin.doc") // working fine
kind regards
Stefan
Stefan
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: tWord Class
Dear Antonio,
I think that tword class is buggy for last harbour and fivewin editions.
http://forums.fivetechsupport.com/viewt ... RD#p200152
Regards
I think that tword class is buggy for last harbour and fivewin editions.
http://forums.fivetechsupport.com/viewt ... RD#p200152
Regards
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: