BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Word OLE: How to Find/Replace Text in Footnotes?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Bernhard Buschinger
Guest





PostPosted: Thu Jan 22, 2004 2:00 pm    Post subject: Word OLE: How to Find/Replace Text in Footnotes? Reply with quote



Hi all,

I am using D7 to manipulate Word documents (with the help from Deepak
Shanoy, even together with .net-SDK Smile ).
Everything is fine as long as I do .Find.Execute in the main part of the
document.
Now I have a new request to find/replace some words in the footnote/endnote
section of the document, but I did not find a way how to.
I tried
myRange := document.content;
myRange.find.ExecuteOld();
OR
document.select;
application.selection.find.executeOld();

This all works fine for the document body, but not for foot/endnotes.
Can anybody




Back to top
Bernhard Buschinger
Guest





PostPosted: Fri Jan 23, 2004 8:03 am    Post subject: I found a way Reply with quote



After long searching in the Office help files and uncounted restarts of D7
I found a way for me
(I am sure to have a PrimaryFooterStory, so I did not search how to check if
it exists.)

myRange := worddoc.storyranges.item(wdPrimaryFooterStory);

myRange.Find.ExecuteOld(sReplaceName, emptyParam, emptyParam,
emptyParam,
emptyParam, emptyParam, weiter,
emptyParam,
emptyParam, sReplaceValue, emptyParam);


Regards, Bernhard


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.