Problem with WORD (Find/Replace)
Problem with WORD (Find/Replace)
Hi all,
I am using the version FWH 16.02 but i got problem with WORD. My previous version of FWH (8.10) does not have this problem and works very well !!
This simple program does not work with versione FWH 16.02:
function main()
local _cfile:=HB_curdrive()+":\"+curdir()+"\test.doc"
local _oword,_oDoc,_oText,_oFind,_lex,_cfound
_oWord :=TOleAuto():New( "Word.Application" )
_oDoc :=_oWord:Get( "Documents" )
_oWord:Set("Visible",.f.) && HERE I START TO HAVE ERRORs
_oDoc:Open(_cFile )
_oText:=_oWord:Selection()
_oFind:=_oText:Find()
_oFind:Text:="#*#"
_oFind:Wrap:=1
_oFind:Set("MatchWildcards",.t.)
_oFind:Execute()
_lex:="#" $ _oText:Text
_cFound:=alltrim(SubStr(_oText:Text,2,Len(Alltrim(_oText:Text))-2))
if ! empty(_cfound)
msginfo("Found: "+_cFound)
else
msginfo("Not Found !")
endif
_oDoc:Close( 0 )
_oWord:quit()
return nil
****
THIS IS THE SIMPLE FILE .doc:
**start doc
Ciao io sono il sig.#ROSSI MARIO#
** end file doc
MANY, MANY THANKS FOR HELP, HELP !!
Romeo
I am using the version FWH 16.02 but i got problem with WORD. My previous version of FWH (8.10) does not have this problem and works very well !!
This simple program does not work with versione FWH 16.02:
function main()
local _cfile:=HB_curdrive()+":\"+curdir()+"\test.doc"
local _oword,_oDoc,_oText,_oFind,_lex,_cfound
_oWord :=TOleAuto():New( "Word.Application" )
_oDoc :=_oWord:Get( "Documents" )
_oWord:Set("Visible",.f.) && HERE I START TO HAVE ERRORs
_oDoc:Open(_cFile )
_oText:=_oWord:Selection()
_oFind:=_oText:Find()
_oFind:Text:="#*#"
_oFind:Wrap:=1
_oFind:Set("MatchWildcards",.t.)
_oFind:Execute()
_lex:="#" $ _oText:Text
_cFound:=alltrim(SubStr(_oText:Text,2,Len(Alltrim(_oText:Text))-2))
if ! empty(_cfound)
msginfo("Found: "+_cFound)
else
msginfo("Not Found !")
endif
_oDoc:Close( 0 )
_oWord:quit()
return nil
****
THIS IS THE SIMPLE FILE .doc:
**start doc
Ciao io sono il sig.#ROSSI MARIO#
** end file doc
MANY, MANY THANKS FOR HELP, HELP !!
Romeo
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problem with WORD (Find/Replace)
As I advised you in private mail, it's one of the many Harbour bugs. You have to replace this
with this
and this
with this
EMG
Code: Select all
_oWord:Set("Visible",.f.)
Code: Select all
_oWord:Visible = .f.
Code: Select all
_oFind:Set("MatchWildcards",.t.)
Code: Select all
_oFind:MatchWildcards = .t.
Re: Problem with WORD (Find/Replace)
Great Enrico,
i go ahead, but i got error when use:
_oText:TypeText( _cvar )
Have i to change also this ?
tks
i go ahead, but i got error when use:
_oText:TypeText( _cvar )
Have i to change also this ?
tks
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problem with WORD (Find/Replace)
This is not in your sample.Romeo wrote:Great Enrico,
i go ahead, but i got error when use:
_oText:TypeText( _cvar )
Have i to change also this ?
tks
EMG
Re: Problem with WORD (Find/Replace)
There are also other istructions, i am finding where is the problem.
I let you know
tks
I let you know
tks
Re: Problem with WORD (Find/Replace)
In the above sample, if my doc is:
*******
Ciao io sono il sig.#ROSSI "di" MARIO#
*******
the istruction of my sample:
_cFound:=alltrim(SubStr(_oText:Text,2,Len(Alltrim(_oText:Text))-2))
gives me:
ROSSI ?di? MARIO instead of ROSSI "di" MARIO
It is a problem for me, and i don't understand the reason,
All works fine in my old version of FWH 8.10 (HARBOUR)
The problem happens only on the earler version FWH 16.01 (HARBOUR)
tks for any help
*******
Ciao io sono il sig.#ROSSI "di" MARIO#
*******
the istruction of my sample:
_cFound:=alltrim(SubStr(_oText:Text,2,Len(Alltrim(_oText:Text))-2))
gives me:
ROSSI ?di? MARIO instead of ROSSI "di" MARIO
It is a problem for me, and i don't understand the reason,
All works fine in my old version of FWH 8.10 (HARBOUR)
The problem happens only on the earler version FWH 16.01 (HARBOUR)
tks for any help
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problem with WORD (Find/Replace)
I just tried and worked fine here (latest FWH and xHarbour). Tried with Harbour also: no problems.
EMG
EMG
Re: Problem with WORD (Find/Replace)
It is a bug of my FWH 16.02 !
Antonio, any patch for me ?
tks
Antonio, any patch for me ?
tks
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problem with WORD (Find/Replace)
Don't think so. It is more likely that you are using wide chars for double quotes instead of the ASCII ones.Romeo wrote:It is a bug of my FWH 16.02 !
EMG
Re: Problem with WORD (Find/Replace)
Ops !
EMG found the error, but cannot resolve it.
He suggest me to post it here
Please download this very sample program e try why i get the problem !!
http://www.modularsoftware.it/~connetti ... eplace.zip
BCC: 7.2
HARBOUR 3.2.0dev (r1603082110)
FWH: 16,02
many thanks to all
EMG found the error, but cannot resolve it.
He suggest me to post it here
Please download this very sample program e try why i get the problem !!
http://www.modularsoftware.it/~connetti ... eplace.zip
BCC: 7.2
HARBOUR 3.2.0dev (r1603082110)
FWH: 16,02
many thanks to all
Re: Problem with WORD (Find/Replace)
Please, nobody can helps me ??
The example is very sample !!
tks
The example is very sample !!
tks
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problem with WORD (Find/Replace)
It is a Harbour bug. Use xHarbour instead.
EMG
EMG
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Problem with WORD (Find/Replace)
But if there is a bug on Harbour is good to found it soon or advise Harbour Team
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: Problem with WORD (Find/Replace)
As also Linares confirmed me, there is a bug in Harbour...
I have wrotye to harbour group
(https://groups.google.com/forum/#!newto ... bour-users)
And also they said me: there is a bug in Harbour (!), but non in xHarbour
I'am waiting sameone resolve it..
I'm praying to all the saints and I hope someone fixs the bug, otherwise I'm in very bad trouble with my clients ;-(
R
I have wrotye to harbour group
(https://groups.google.com/forum/#!newto ... bour-users)
And also they said me: there is a bug in Harbour (!), but non in xHarbour
I'am waiting sameone resolve it..
I'm praying to all the saints and I hope someone fixs the bug, otherwise I'm in very bad trouble with my clients ;-(
R
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Problem with WORD (Find/Replace)
I hope you solve your problems soon
But I'm convinced, given my experience in this forum and google forums and others
that if the topic is of personal interest nobody will try to solve the problem,
but if the subject is of general interest then you will see that some important guru will be beautiful in the chicken coop !!!
But I'm convinced, given my experience in this forum and google forums and others
that if the topic is of personal interest nobody will try to solve the problem,
but if the subject is of general interest then you will see that some important guru will be beautiful in the chicken coop !!!
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC