Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 08-02-2015, 05:34 PM
macropod's Avatar
macropod macropod is offline Mail merge from excel - need to create sheets and create a table Windows 7 64bit Mail merge from excel - need to create sheets and create a table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

If you're using Excel, you shouldn't need the connection string, as the link I pointed you to shows. Assuming the field works when first created, I can't see why it wouldn't also update when refreshed after the Excel data changes. Also, what is the error message? It's a bit hard to diagnose without the error message. That said, based on the workbook attached to your first post, you should be able to use something like:
Code:
{DATABASE \d "W:\\XXXXX\\XXXXX\\Trial MM data RH.xlsx" \s "SELECT `Building`, `Floor`, `Room/Area` FROM `Sheet1$` WHERE `Extent of damage score` = 0 ORDER BY `Sample`" \l "23" \b "191" \h}
or, if the document and data source are stored in the same folder:
Code:
{DATABASE \d "{FILENAME \p}/../Trial MM data RH.xlsx" \s "SELECT [Building], [Floor], [Room/Area] FROM [Sheet1$] WHERE [Extent of damage score] = 0 ORDER BY [Sample]" \l "23" \b "191" \h}
where {FILENAME \p} is an embedded field, as per the link I gave you.

Note that it doesn't really matter whether you delineate the fields with `` or [].
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge from excel - need to create sheets and create a table Mail Merge to create specific number of table rows flackend Mail Merge 4 12-01-2023 02:49 PM
Using Mail Merge to create summary report in ONE document ChandaS Mail Merge 1 12-19-2014 10:16 PM
Mail merge from excel - need to create sheets and create a table Would like to mail merge excel spreadsheet with word doc and create new page when a catagory changes esherwood Mail Merge 1 07-21-2014 09:55 PM
Mail merge from excel - need to create sheets and create a table How to use mail merge to create a list sorted by category in Word elisa2013 Mail Merge 5 03-14-2014 02:35 AM
Mail merge from excel - need to create sheets and create a table Urgent Supprt Need to Create Mail Merge letter risnasmhd Mail Merge 1 09-29-2013 08:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft