Consulting

Results 1 to 2 of 2

Thread: Mail Merge Macro with Query

  1. #1

    Mail Merge Macro with Query

    I'm using a web app to initiate 3 different templates. Within those templates, a macro runs that does a mail merge and print the letters and closes that document.

    I have a query set for each document. It looks in the data source (a column in an Excel spreadsheet) for specific criteria. If it finds that criteria it includes that record in the mail merge.

    This seems to work unless it doesn't find any criteria that meets. Instead of just ignoring the merge part it gives an error.

    I'd like to have the Word macro not error if it doesn' t find merge criteria.

  2. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Hi CaliBlu,

    Welcome to VBAX! It might help our Experts answer your question if you could provide a sample file or any code that you are using.

    Just be advised that you need to zip a file to attach it, and be sure to remove any confidential info.

    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •