Winword and OLE

User avatar
fp
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Re: Winword and OLE

Post by fp »

Hallo Enrico,

thanks. Your sample works, but furthermore only in the first frame of a document.

Is there a way _ all frames of a document and replace something?

Tank
Frank-Peter
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Winword and OLE

Post by Enrico Maria Giordano »

Frank,
fp wrote:Hallo Enrico,

thanks. Your sample works, but furthermore only in the first frame of a document.

Is there a way _ all frames of a document and replace something?

Tank
My sample has a loop that should serve to replace each frames. I don't understand why it doesn't work for you. Have you double check the parameters you are passing to the function? Anyway, I used it in a real application and it was working fine.

EMG
User avatar
fp
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Re: Winword and OLE

Post by fp »

Hello Enrico,

sorry, but your code only checks the first frame with me.

your first
oRng := oDoc:StoryRanges[wdTextFrameStory]

returns in oRng:Text only the content of the first frame, not of the others.

And if cSrc is not in oRng:Text, then "AT(cSrc,cRng:Text) > 0" is false and the function exit before "looping".

Nevertheless, many thanks for your efforts
Frank-Peter
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Winword and OLE

Post by Enrico Maria Giordano »

Frank,
fp wrote:Hello Enrico,

sorry, but your code only checks the first frame with me.

your first
oRng := oDoc:StoryRanges[wdTextFrameStory]

returns in oRng:Text only the content of the first frame, not of the others.

And if cSrc is not in oRng:Text, then "AT(cSrc,cRng:Text) > 0" is false and the function exit before "looping".

Nevertheless, many thanks for your efforts
Please send me the DOC (Word 2000) so I can test it here.

EMG
User avatar
fp
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Re: Winword and OLE

Post by fp »

Hello Enrico,

I've just sent the doc to your private mail-adress.

Thanks
Frank-Peter
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Winword and OLE

Post by Enrico Maria Giordano »

Frank,
fp wrote:Hello Enrico,

I've just sent the doc to your private mail-adress.

Thanks
Your document has something wrong. I tried with a new document and it works fine. I've just sent a working sample to your private email.

EMG
User avatar
fp
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Re: Winword and OLE

Post by fp »

Thank you Enrico,

your sample works well. Maybe my dokument contains to much frames and / or bitmaps in frames. I will check it.
Frank-Peter
Post Reply