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
Winword and OLE
Re: Winword and OLE
Frank-Peter
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Winword and OLE
Frank,
EMG
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.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
EMG
Re: Winword and OLE
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
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
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Winword and OLE
Frank,
EMG
Please send me the DOC (Word 2000) so I can test it here.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
EMG
Re: Winword and OLE
Hello Enrico,
I've just sent the doc to your private mail-adress.
Thanks
I've just sent the doc to your private mail-adress.
Thanks
Frank-Peter
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Winword and OLE
Frank,
EMG
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.fp wrote:Hello Enrico,
I've just sent the doc to your private mail-adress.
Thanks
EMG
Re: Winword and OLE
Thank you Enrico,
your sample works well. Maybe my dokument contains to much frames and / or bitmaps in frames. I will check it.
your sample works well. Maybe my dokument contains to much frames and / or bitmaps in frames. I will check it.
Frank-Peter