+ Reply to Thread
Results 1 to 8 of 8

mail merge (?) on certain rows of sheet with access records included too?

  1. #1
    Registered User
    Join Date
    08-11-2013
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    6

    mail merge (?) on certain rows of sheet with access records included too?

    I have what seems to me like a fairly complicated task I'm trying to achieve...

    I have a spreadsheet (HK) that includes a list of room numbers (ColB) and tasks to perform that day (ColQ). I want to print off a page (currently a word doc), but only for the room numbers where the task is one of a few options ("Clean" or "Linen" or "Check"), and include on each instance the room number and task.

    To further complicate things, I also want to connect to an access db (MT) and add into each instance of the template/mail merge document records with a matching room number.

    I'd like to do all this from inside excel as the users are already printing opening and printing the HK spreadsheet, if possible.

    Anybody got some help on how to achieve all this?

  2. #2
    Registered User
    Join Date
    08-11-2013
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: mail merge (?) on certain rows of sheet with access records included too?

    I've been thinking more about this and it seems that I should be able to do it if I can just get a list of the room numbers I need to query the database on.

    How can I make a list of room numbers that only have the appropriate task for the day, with out blanks in between?

  3. #3
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: mail merge (?) on certain rows of sheet with access records included too?

    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  4. #4
    Registered User
    Join Date
    08-11-2013
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: mail merge (?) on certain rows of sheet with access records included too?

    Thanks, that helps.

    I managed to get that sub to delete rows, but not really the right ones...

    In my sample data, one string to search for is actually "Full Clean". If I use the following code:

    Please Login or Register  to view this content.
    it will delete all the rows that do not have "Full Clean" in Column B, however it leaves all the rows with blank Column B. If I try also test for and delete rows that don't contain two possible strings ("Full Clean" "Stay"), I get some incorrectly deleted rows, and keep the blanks again.

    Thoughts?

  5. #5
    Registered User
    Join Date
    08-11-2013
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: mail merge (?) on certain rows of sheet with access records included too?

    If I run the code multiple times it will eventually delete the blank rows.

  6. #6
    Registered User
    Join Date
    08-11-2013
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: mail merge (?) on certain rows of sheet with access records included too?

    Ahh, I need to run the loop up from the bottom.

  7. #7
    Registered User
    Join Date
    08-11-2013
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: mail merge (?) on certain rows of sheet with access records included too?

    Please Login or Register  to view this content.

  8. #8
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: mail merge (?) on certain rows of sheet with access records included too?

    Or
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mail merge - Number of records
    By c_robertson in forum Excel General
    Replies: 6
    Last Post: 02-03-2021, 01:03 PM
  2. Mail Merge - Mutiple records per page
    By mivanows in forum Excel General
    Replies: 0
    Last Post: 08-27-2012, 02:53 PM
  3. Mail Merge Multiple Records on 1 page
    By NealEHerman in forum Word Formatting & General
    Replies: 5
    Last Post: 08-26-2012, 04:08 AM
  4. Mail merge macro - ensuring only certain rows are pulled from data sheet
    By panaceus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2009, 08:54 AM
  5. Advanced Mail Merge-Combining Records
    By jkanclerz in forum Excel General
    Replies: 3
    Last Post: 11-08-2008, 12:55 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1