View Single Post
 
Old 04-20-2011, 07:27 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Phil,

If you add the following macro to, say, Word's 'Normal' template, running it will tell you whether the active document is a mailmerge main document and, if so, where it thinks the data source should be.

Code:
Sub FindmergeSource()
With ActiveDocument.MailMerge
  If .MainDocumentType <> wdNotAMergeDocument Then
    MsgBox .DataSource.Name
  Else
    MsgBox "Not A Merge Document"
  End If
End With
End Sub
For help on installing/using macros, see: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote