Page 1 of 1

Error al

Posted: Thu Jan 16, 2020 7:40 pm
by alfaqui
Hola a Todos,
Encontré un ejemplo de como enviar información de una dbf a word, el cual me parece espectacular. Dicho ejemplo funciona muy bien el problema es que al hacerle modificaciones me presenta el error :
"Lo sentimos. No se puede abrir el documento creado porque existe un problema con el contenido"

1. Cree el archivo .rtf en wordpad como lo recomiendan
2. Uso el Hmg 3.44
3. uso word 2016
4. El Windows que utilizo es 7 Profesional

Le agradezco su colaboración

Re: Error al

Posted: Thu Jan 16, 2020 7:48 pm
by alfaqui
Anexo archivo

Re: Error al

Posted: Thu Jan 16, 2020 11:24 pm
by SALINETAS24
Hola alfaqui.., creo que MEMOWRIT no graba en formato .RTF.

Dale un vistazo a este enlace para Harbour.

https://vivaclipper.wordpress.com/2014/02/12/trtf/

Y en HMG puedes usar RICHEDITBOX. Yo creo que podrías definir el control, mantenerlo oculto, cargar tu variable en el RICHEDITBOX y acto seguido guardarla en formato ".RTF"

Re: Error al

Posted: Tue Feb 04, 2020 12:48 pm
by alfaqui
hola a todos,
El Ejemplo que hablo es para MiniGui Extended lo encontré en este enlace http://hmgforum.com/viewtopic.php?t=1247 no soy muy bueno pero estoy practicando todos los días para mejorar viendo los ejemplos que encuentro.

Hay alguna posibilidad de usar este ejemplo con HMG minigui ya que esto es lo que estoy necesitando.

****
Hi everyone,
The example I speak is for MiniGui Extended I found it on this link http://hmgforum.com/viewtopic.php?t=1247 I am not very good but I am practicing every day to improve seeing the examples I find.

Is there any possibility to use this example with HMG minigui since this is what I am needing

Re: Error al

Posted: Tue Feb 04, 2020 1:06 pm
by AUGE_OHR
the Dbf2Word.RAR Sample also use MEMOREAD() so it is the same Problem when got CHR(26)

you need to use low level function to read those data

Code: Select all

#include "Fileio.ch" 
 
PROCEDURE Main(cFile)    
LOCAL cData
   IF FILE((cFile)    
      cData := LowLevelRead(cFile)
and this function to read

Code: Select all

FUNCTION LowLevelRead(cFile)
LOCAL nHandle, cBuffer

   nHandle := FOpen(cFile, FO_READWRITE+FO_DENYWRITE) 
   nEnd := FSeek(nHandle, 0 , FS_END ) 
   cBuffer := SPACE(nEnd)

   FSeek( aFile[F_HANDLE], 0 , FS_SET ) 
   FRead( nHandle, @cBuffer)
   FClose( nHandle)
RETURN cBuffer