FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour wordtable.prg sample
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
wordtable.prg sample
Posted: Sat Apr 27, 2013 10:30 PM

Hello,
I tried to run Fivewin wordtable.prg sample.
Can someone please help me.
Thanks in advance
Otto

Application

Path and name: c:\FWH\samples\wordtable.exe (32 bits)
Size: 1,967,616 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20130326)
FiveWin Version: FWHX 13.02
Windows version: 6.1, Build 7601 Service Pack 1

Time from start: 0 hours 0 mins 1 secs
Error occurred at: 04/28/13, 00:25:10
Error description: Error Word.Application:ACTIVEDOCUMENT:TABLES:ADD:ROWS:ITEM:CELLS:ITEM:RANGE/0 S_OK: INSERTAFTER
Args:
[ 1] = D / /

Stack Calls

Called from: => TOLEAUTO:INSERTAFTER( 0 )
Called from: wordtable.prg => MAIN( 77 )

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: wordtable.prg sample
Posted: Sun Apr 28, 2013 12:21 AM
Otto

Code (fw): Select all Collapse
   :Cells(3):Range:InsertAfter( Dtoc(Customer->HIREDATE)  )

Regards
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: wordtable.prg sample
Posted: Sun Apr 28, 2013 02:50 AM

Inserting empty dates errors out.
Mr Navarro's suggestion to use DTOC() for date values is good. Even better is to skip exporting empty dates.

Regards



G. N. Rao.

Hyderabad, India
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: wordtable.prg sample
Posted: Sun Apr 28, 2013 07:19 AM
Dear Mr. Rao,
I try to open a word document but get following error.
Do you know what the reason can be.
Thanks in advance
Otto


Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

  Local oWord  
   *----------------------------------------------------------
        
  oWord := CreateObject( "Word.Application" )
  msginfo( oWord:Version )
  oWord:ChangeFileOpenDirectory ( "C:\fwh\samples\" )
  oWord:Documents:FileName( "VOffert.docx" )
 oWord:Visible := .T.
    
return nil

//----------------------------------------------------------------------------//

Application
===========
Path and name: C:\fwh\samples\word.exe (32 bits)
Size: 1,779,200 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
FiveWin Version: FWHX 12.03
Windows version: 6.1, Build 7601 Service Pack 1

Time from start: 0 hours 0 mins 1 secs
Error occurred at: 04/28/13, 09:14:44
Error description: Error Word.Application:DOCUMENTS/9 'Item' ist keine Eigenschaft.: OPEN
Args:

Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:OPEN( 0 )
Called from: C:\fwh\samples\word.prg => MAIN( 13 )
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: wordtable.prg sample
Posted: Sun Apr 28, 2013 08:39 AM

Hello,
I resolved my problem:

"File block setting" setup in WINWORD was wrong.
Best regards,
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: wordtable.prg sample
Posted: Sun Apr 28, 2013 09:02 AM

MAILMERGE

The next error:
Error description: Error Word.Application:ACTIVEDOCUMENT:MAILMERGE/3 DISP_E_MEMBERNOTFOUND: EXECUTE
I resolved by changing the registry key:

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options
"SQLSecurityCheck" = dword: 000000001.Registrierungs-Editor starten.

Best regards,
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: wordtable.prg sample
Posted: Sun Apr 28, 2013 09:22 AM

no file conversion message box in Word 2010 in merge text
HKEY_CURRENT_USER\Software\Microsoft \Office\12.0\Word\Options
DefaultCpg"=dword:0000fde9 für UTF8

Best regards,
Otto

Continue the discussion