Microsoft Office Forums Word mail merge with unique charts

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2019, 02:10 AM
retro retro is offline Word mail merge with unique charts Windows 10 Word mail merge with unique charts Office 2016
Novice
Word mail merge with unique charts
 
Join Date: Mar 2019
Posts: 3
retro is on a distinguished road
Default Word mail merge with unique charts

Hi there,
I'm trying to create a mail merge where each document contains a bar graph based off a value, seems a really simple task but I don't think its achievable.

I did find one helpful post (https://www.msofficeforums.com/mail-...cel-graph.html) where user macropod briefly explained to use field codes, the demo works but information is lacking online.



I currently generate these letters using a PHP script outputing them as PDF files but it would make life so much easier if i could convert this as a mail merge, the only thing stopping me is the chart.

My current chart setup is based on
"Name"
"Number of Minutes Lost"

Some students have values of 15 minutes lost, 189 minutes lost all the way up to 3989 minutes lost



The green bar is average for the year

Any advice would be greatly apreciated!

Last edited by retro; 03-13-2019 at 03:05 AM. Reason: image example upload
Reply With Quote
  #2  
Old 03-13-2019, 03:08 AM
macropod's Avatar
macropod macropod is offline Word mail merge with unique charts Windows 7 64bit Word mail merge with unique charts Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,525
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Did you try implementing the example in the Demo document in the link?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 03-13-2019, 03:12 AM
retro retro is offline Word mail merge with unique charts Windows 10 Word mail merge with unique charts Office 2016
Novice
Word mail merge with unique charts
 
Join Date: Mar 2019
Posts: 3
retro is on a distinguished road
Default

Thanks for the reply,
I did and it works great, struggled with implementing it to fit the 21 conditions i have though, edited your example to accommodate numbers above 100 (as im not dealing with percentages) but this can be unmanageable when dealing with numbers that run into the thousands, which is why i need some if statements
eg if val < 10 then only draw graph up to the less than 10 mark, if val > 200 then draw the full chart
Reply With Quote
  #4  
Old 03-13-2019, 03:22 AM
macropod's Avatar
macropod macropod is offline Word mail merge with unique charts Windows 7 64bit Word mail merge with unique charts Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,525
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

For the most part, all you should need to do is copy & paste the example from that document as-is, rather than trying to reconstruct the entire field yourself.

As for the output, maybe you should consider using logarithmic values for the output. That way the re-scaling is both progressive and automatic. To see how to do that in Word, check out the Logarithms topic in my Microsoft Word Field Maths Tutorial: https://www.msofficeforums.com/word/...-tutorial.html. Otherwise, all you need to add is a single IF test that divides the merged value by a given constant if it exceeds 10.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 03-13-2019, 05:46 AM
gmayor's Avatar
gmayor gmayor is offline Word mail merge with unique charts Windows 10 Word mail merge with unique charts Office 2016
Expert
 
Join Date: Aug 2014
Posts: 2,805
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice
Default

Quote:
Originally Posted by retro View Post
Any advice would be greatly apreciated!
Maybe https://www.gmayor.com/mail_merge_charts.htm would help?
__________________
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
  #6  
Old 03-13-2019, 07:00 AM
retro retro is offline Word mail merge with unique charts Windows 10 Word mail merge with unique charts Office 2016
Novice
Word mail merge with unique charts
 
Join Date: Mar 2019
Posts: 3
retro is on a distinguished road
Default

Thankyou for the reply ...

I have managed to do it another way as i needed it to look as close to the chart as possible, I have now amended my mail merge data with a new column and a nested if statement in excel puts the file paths in matching the conditions i have set,

I then used macropod's example of field code to include a picture in the word mail merge.

{ include picture {if true"{MERGEFILED pupil_mins_lost_imagepath}" \d }

This works as intended!

Thankyou both for your help
Reply With Quote
Reply

Tags
charts, mail merge

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge List of Items for Unique OwnerIDs HunterH Mail Merge 1 10-12-2018 02:03 PM
Word mail merge with unique charts Unique data per record in mail merge chart aplarsen Word VBA 2 02-16-2018 04:01 PM
Word mail merge with unique charts Activating Unique Links in Email Messages Using a Mail Merge User02182016 Mail Merge 1 02-23-2016 06:02 PM
Word mail merge with unique charts Mail Merge URL - a unique question kitefrantic Mail Merge 1 12-31-2013 07:34 PM
dynamic charts based on mail merge fields jwajehee Mail Merge 0 10-05-2011 09:47 AM


All times are GMT -7. The time now is 02:02 PM.


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