Auto Mail Merge with TOC PROBLEM? (1 Viewer)

mr_fish

Registered User.
Local time
Today, 15:47
Joined
Dec 8, 2005
Messages
40
Hello all,

I've been looking into Mail Merges from Access through VBA and after much messing got a basic mail merge working, but I want to be able to do a bit more with it, the only problem is I'm not sure if a mail merge can do what I want or whether I should be looking in another direction. Anyway I'll describe the problem and if anyone can point me in the right direction, thanks.

The merge in question is a report of Product coverage in Magazines, an access database stores the magazine name, circulation and a UNC link + filename where jpg pictures can be found.

As each Magazine article can be x number of pages long and a UNC path and filename are stored in Access allowing jpeg files to be inserted into the mail merge for each page of an article, is there any way I can change the header for every page after the first one so that it displays "continued".

The template code in word is posted below.

{MERGEFIELD "tbl_Media_CompanyName"}
{MERGEFIELD tbl_Coverage_Cover_Date \@"MMMM YYYY"}
Circulation - {MERGEFIELD Circulation}
{INCLUDEPICTURE "{MERGEFIELD "PictureLocation"}"}

Also is it possible to create a Table of Contents - I realise I could promote the {MERGEFIELD "tbl_Media_CompanyName"} as a Outline Header 1 in the template, but this will show several entries for each multi page article when all I want is the first page of an article to be referenced.

Thanks again for being bothered to read this far.

Jon
 

mr_fish

Registered User.
Local time
Today, 15:47
Joined
Dec 8, 2005
Messages
40
Solved half the problem by creating a page number field in Access. Then in word I used an IF fieldcode in the template itself to compare whether the page number was <>1 and changed the headings based on that.

{MERGEFIELD "tbl_Media_CompanyName"}{IF {MERGEFIELD Page_Number } <>1 " - continued" ""}
{MERGEFIELD tbl_Coverage_Cover_Date \@"MMMM YYYY"}
Circulation - {MERGEFIELD Circulation}
{INCLUDEPICTURE "{MERGEFIELD "PictureLocation"}"}

Still not sure how to do a Table of Contents based on all Page_Number 1 entries, but will attack that problem later.
 

Users who are viewing this thread

Top Bottom