Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lee Lee is offline
external usenet poster
 
Posts: 99
Default Adding Data Source File Name to Word 2007 Merge

I am trying to add the file name for my data source to the bottom of my Word
2007 merge document & cannot find information on how to include. Any
suggestions?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Adding Data Source File Name to Word 2007 Merge

You would need to run a macro containing the following code AFTER attaching
the data source to the mail merge main document:

With ActiveDocument
.Sections(1).Footers(wdHeaderFooterPrimary).Range. InsertAfter
..MailMerge.datasource.Name
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"lee" wrote in message
...
I am trying to add the file name for my data source to the bottom of my
Word
2007 merge document & cannot find information on how to include. Any
suggestions?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Adding Data Source File Name to Word 2007 Merge

Hi Lee,

An alternative approximation would be to use a DDE field to your main mailmerge document, coded along the lines of:
{IF{MERGESEQ} 0 { dde excel system selection }}
This will return the filename and the last field position from the file, in the form of:
'[MailMergeData.xls]Sheet1'!R150C3

--
Cheers
macropod
[MVP - Microsoft Word]


"lee" wrote in message ...
I am trying to add the file name for my data source to the bottom of my Word
2007 merge document & cannot find information on how to include. Any
suggestions?

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Word 2007 saving the data source Sharon Frustrated with Office 2007 New Users 0 May 16th 08 08:06 PM
Word 2007 data source file types Matthew S.[_2_] Mailmerge 2 April 16th 08 08:36 PM
Mail Merge - How to create data source using Word 2007? Cindy Mailmerge 1 June 29th 07 08:10 AM
Word 2007 Mail Merge Data Source Read Only Michelle Mailmerge 1 January 8th 07 03:56 PM
word cannot open file as a data or header source bec it is a mail merge main doc gerry Mailmerge 1 November 20th 05 01:24 PM


All times are GMT +1. The time now is 09:50 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"