tWord Class

tWord Class

Postby Colin Haig » Mon May 18, 2009 8:59 am

Hi
Can anyone point me to where I can download tWord class or send me a copy.

Regards

Colin
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: tWord Class

Postby Otto » Mon May 18, 2009 4:12 pm

Hello Colin,
what word version do you plan to work with?

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: tWord Class

Postby Colin Haig » Mon May 18, 2009 10:54 pm

Hi Otto

I am using Word 2003.

Regards

Colin
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: tWord Class

Postby StefanHaupt » Tue May 19, 2009 7:58 am

Colin,

here you can download it

http://www.box.net/shared/o8om8gj295
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: tWord Class

Postby Colin Haig » Tue May 19, 2009 8:47 am

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
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: tWord Class

Postby StefanHaupt » Tue May 19, 2009 11:50 am

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.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: tWord Class

Postby Colin Haig » Tue May 19, 2009 1:58 pm

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
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: tWord Class

Postby StefanHaupt » Wed May 20, 2009 7:31 am

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:

Code: Select all  Expand view
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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: tWord Class

Postby StefanHaupt » Fri May 22, 2009 4:39 pm

Colin,

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  Expand view
oWord := TWord():New()

//oWord:NewDoc('Creswin.doc')  // not working !
oWord:OpenDoc ("d:\xbase\xharbour\tword\Creswin.doc") // working fine


Hope it helps
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: tWord Class

Postby Antonio Linares » Wed Apr 24, 2019 4:29 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: tWord Class

Postby hmpaquito » Wed Apr 24, 2019 6:06 pm

Dear Antonio,

I think that tword class is buggy for last harbour and fivewin editions.

viewtopic.php?f=6&t=33813&hilit=TWORD#p200152

Regards
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: tWord Class

Postby Antonio Linares » Thu Apr 25, 2019 6:36 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], wilsongamboa and 54 guests

cron