Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word automation question
Message
From
18/06/2003 09:39:21
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/06/2003 09:21:24
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00794194
Message ID:
00801140
Views:
23
>Hi Cetin,
>
>I'm back with more:
>
>My inserted table works great. Now I need to have a Header on each page that the table fills. The header must contain 2 variables:
>1- school name
>2- report date
>These are filled easily on the cover page with Find/Replace (since MM would kill the bookmarks).
>
>Being in the HEADER of subsequent pages, though, means that Find/Replace IGNORES them.
>
>Do you know of any syntax to allow me to Find/Replace WITHIN a header ?
>
>I can send you the Word doc if this is not clear.
>
>Thanks,
>
>Henry

Henry,
AFAIK find operates the same way in a header. However it doesn't check all headers (as if a header is a separate doc).
You'd need something like :
With .ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary)
 if atc('MySearch',.Range.Text)>0
   ...
 endif
endwith
And sending a mailmerge to new doc creates a section for each merge. You'd need to loop the sections.

I think (not tested) directly placing a mergefield in header would be more easier.

Send me the doc (and any tables to play on with dbc) if you want and I can see more clearly :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform