|
ups.. sorry my bad.. it should be like this... It's Friday
and my brain has turned into custurd.
begin
FootRng:=
Doc.StoryRanges.Item(wdFootnotesStory);
FootRng.Collapse(wdCollapseEnd);
FootRng.Find.Text:= txt; FootRng.Find.Forward:= True; FootRng.Find.Wrap:= FindWrap; FootRng.Find.Format:= True; FootRng.Find.MatchCase:= False; FootRng.Find.MatchWholeWord:= False; FootRng.Find.MatchWildcards:= False; FootRng.Find.MatchSoundsLike:= False; FootRng.Find.MatchAllWordForms:= False; while
FootRng.Find.Execute do
FootRng.Text:= 'Blah
blah';
end; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marshall, Paul Sent: Friday, 1 October 2004 4:08 p.m. To: NZ Borland Developers Group - Delphi List Subject: [DUG] Word Automation I'm
using Word automation to create a report.
Opening a template file, and using Find/Replace to substitute various
tokens with real data.
This
sort of thing seems to work:
WordDoc1.Content.Find.Execute(vSearchText, EmptyParam, EmptyParam,
EmptyParam, EmptyParam,
EmptyParam,
EmptyParam, vWrap, EmptyParam, vReplaceText, vAll, EmptyParam, EmptyParam, EmptyParam, EmptyParam); But it
only finds and replaces in the body of the document, not in the header or footer
sections.
Can
anyone tell me what I need to do?
Thanks,
Paul.
Attention: The information contained in this message and/or attachments from AgResearch Limited is intended only for the persons or entities to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipients is prohibited by AgResearch Limited. If you have received this message in error, please notify the sender immediately. |
_______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
