Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #16  
Old 06-22-2021, 03:39 PM
QNRyfzKPYQyC QNRyfzKPYQyC is offline Mail Merge: Using One Excel File with Multiple Sheets Mac OS X Mail Merge: Using One Excel File with Multiple Sheets Office 2016 for Mac
Novice
 
Join Date: Jun 2021
Posts: 4
QNRyfzKPYQyC is on a distinguished road
Default

I've update the original post with attachments I've been playing around with. maybe that helps to solve my issue?


Data source path was actually full path. Without the sql I was able to print the rows from Sheet 2. With the sql I get the error I was talking about
  #17  
Old 06-22-2021, 03:45 PM
macropod's Avatar
macropod macropod is offline Mail Merge: Using One Excel File with Multiple Sheets Windows 10 Mail Merge: Using One Excel File with Multiple Sheets Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,234
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

You have omitted the {FILENAME \p} field from the DATABASE field code. You also have a paragraph break after { MERGEFIELD Manager_ID }.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
  #18  
Old 06-24-2021, 03:09 AM
QNRyfzKPYQyC QNRyfzKPYQyC is offline Mail Merge: Using One Excel File with Multiple Sheets Mac OS X Mail Merge: Using One Excel File with Multiple Sheets Office 2016 for Mac
Novice
 
Join Date: Jun 2021
Posts: 4
QNRyfzKPYQyC is on a distinguished road
Default still no luck

Hi, going insane. I've managed to get a copy of the examples above working as it should. However with my own data it doesn't fly. Would you mind taking a look and see what I'm doing wrong?

{ MERGEFIELD producentid }
{ MERGEFIELD producentnaam }

{DATABASE \d "{FILENAME \p}/../factuur.xlsx" \s " SELECT [ean], [rate], [count], [market], [deposit], [pb], [vat], [amount] FROM [overview$] WHERE [producentid] = {MERGEFIELD producentid} ORDER BY [amount] " \l "15" \b "49" \h}

factuur.docx
factuur.xlsx
  #19  
Old 06-24-2021, 04:13 PM
macropod's Avatar
macropod macropod is offline Mail Merge: Using One Excel File with Multiple Sheets Windows 10 Mail Merge: Using One Excel File with Multiple Sheets Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,234
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Since your {MERGEFIELD producentid} outputs a number, you need to enclose it in tick marks:
{DATABASE \d "{FILENAME \p}/../factuur.xlsx" \s "SELECT [ean], [rate], [count], [market], [deposit], [pb], [vat], [amount] FROM [overview$] WHERE [producentid] = '{MERGEFIELD producentid}' ORDER BY [amount]" \l "15" \b "49" \h}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
  #20  
Old 06-25-2021, 12:39 AM
QNRyfzKPYQyC QNRyfzKPYQyC is offline Mail Merge: Using One Excel File with Multiple Sheets Mac OS X Mail Merge: Using One Excel File with Multiple Sheets Office 2016 for Mac
Novice
 
Join Date: Jun 2021
Posts: 4
QNRyfzKPYQyC is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Since your {MERGEFIELD producentid} outputs a number, you need to enclose it in tick marks
Yes! You're a hero, thx
  #21  
Old 10-13-2021, 01:31 AM
Yiii Yiii is offline Mail Merge: Using One Excel File with Multiple Sheets Mac OS X Mail Merge: Using One Excel File with Multiple Sheets Office 2019
Novice
 
Join Date: Oct 2021
Posts: 1
Yiii is on a distinguished road
Default Please help!

Quote:
Originally Posted by macropod View Post
Since your {MERGEFIELD producentid} outputs a number, you need to enclose it in tick marks:
{DATABASE \d "{FILENAME \p}/../factuur.xlsx" \s "SELECT [ean], [rate], [count], [market], [deposit], [pb], [vat], [amount] FROM [overview$] WHERE [producentid] = '{MERGEFIELD producentid}' ORDER BY [amount]" \l "15" \b "49" \h}
I have attached 2 document to this reply. I'm very new to this mail merge functions. This is an interview question posted by the employer.

Could you help on this? Please. The deadline is 13 Oct 2021 10:00pm.
Attached Files
File Type: xlsx test case contact details.xlsx (13.9 KB, 1 views)
File Type: docx test case email content.docx (14.0 KB, 2 views)
  #22  
Old 10-13-2021, 04:35 PM
macropod's Avatar
macropod macropod is offline Mail Merge: Using One Excel File with Multiple Sheets Windows 10 Mail Merge: Using One Excel File with Multiple Sheets Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,234
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Kindly don't ask for help cheating your way into a job. Thread closed.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge: Using One Excel File with Multiple Sheets Merge one Excel file into multiple Word Documents Rushpac Mail Merge 2 01-27-2017 02:49 PM
Mail Merge: Using One Excel File with Multiple Sheets Insert slip sheets during a mail merge mcboats2 Mail Merge 1 12-07-2015 05:01 PM
Mail Merge: Using One Excel File with Multiple Sheets Mail merge from excel - need to create sheets and create a table bluenosebex Mail Merge 5 08-02-2015 05:34 PM
Mail Merge: Using One Excel File with Multiple Sheets Code for mail merge to reference saved excel file jtemp57 Word VBA 10 12-16-2013 11:02 PM
Mail Merge: Using One Excel File with Multiple Sheets How do I merge data from one sheet in a workbook out into multiple sheets nolesca Excel 4 06-07-2010 08:13 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:22 AM.


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