Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2015, 07:16 AM
Matthew7 Matthew7 is offline Mail merge from Access to Word Windows 8 Mail merge from Access to Word Office 2007
Novice
Mail merge from Access to Word
 
Join Date: Feb 2015
Location: Scotland
Posts: 1
Matthew7 is on a distinguished road
Default Mail merge from Access to Word

I am preparing a Word document for a mail shot, and need to import data from my access file. I am trying to build a formula that will take a field from the Access file and, if it is true, print some data.

So far, I have =IF(Schedule 2014=40,full page). Schedule 2014 is a column in the query I am using in this mail merge, 40 is an amount of money in that column and full page is the text that should appear in the Word document. The result I am getting is!Syntax Error, 2014 .

The remainder of the information I am merging is working well. I am asking for the 40 to appear in the relevant recipient's letter which is fine, but I want it to print full page before it (or half page for 30, or quarter page for 20)



Anyone help?
Reply With Quote
  #2  
Old 02-18-2015, 11:05 PM
gmayor's Avatar
gmayor gmayor is offline Mail merge from Access to Word Windows 7 64bit Mail merge from Access to Word Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If there are only the three relevant values, then in the merge document itself include the following field construction:

{ IF { MERGEFIELD "Schedule 2014" } ="40" "{ INCLUDETEXT "C:\\Path\\Fullpage.docx" }" }{ IF { MERGEFIELD "Schedule 2014" } ="30" "{ INCLUDETEXT "C:\\Path\\Halfpage.docx" }" }{ IF { MERGEFIELD "Schedule 2014" } ="20" "{ INCLUDETEXT "C:\\Path\\Quarterpage.docx" }" }

Each bracket pair is inserted with CTRL+F9. Change the names and paths of the three documents, as appropriate, to insert the text they contain.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge from Access to Word Mail merge pictures from Access to Word Jolsen Mail Merge 7 11-22-2013 01:23 PM
Mail merge from Access to Word Mail Merge from Access Query to Word ChrisMan Mail Merge 2 12-10-2012 11:22 PM
Mail merge from Access to Word Access to Word Mail Merge Issue (255 characters) ChrisPine Mail Merge 1 02-16-2012 10:01 PM
Mail merge from Access to Word Access password blocking Word mail merge dbaldwin Mail Merge 3 04-22-2011 02:50 PM
Word / Access - Mail Merge ibuilders Mail Merge 0 07-30-2007 06:18 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:23 AM.


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