I have wanted to do this for over a year now and someone on twitter referred me here. I am really grateful for the approach you too, that we could run it ever so often to see what the script does up to this point. I needed quite some time to finish it, but I have procrastinated doing exactly what you are showing for more than a year. Hence again: Thank You!!!
@jesse63274 жыл бұрын
Wow, this is awesome. We are using Google Suite at work now, and several months back I told someone that there's no way to do a mail merge like function from Google Sheets to Docs. I am so glad I found this; now I can help them out, since they need to get out of their MS Office environment. Thank you!!
@overnesss5 жыл бұрын
I'm following you for months now. Your channel helped me a lot, but this. This is just exactly what I was struggling with since last month. Thanks for your content.
@TheKnightrunners4 жыл бұрын
Thanks. I lost MS office during an Apple upgrade. This is a big help for getting the Christmas mail out!
@gorkasanz16173 жыл бұрын
A five star tutorial. And, for non-english people very clear speech. And it have a lot of tips to learn coding in Google Apps
@rachaellynn704 жыл бұрын
Awesome tutorial. Love how you walk through your thinking process and the various iterations. Plus, I needed to do exactly this (without an add-one). Thanks!
@mpolek4 жыл бұрын
Thank you so much! This worked perfectly for me to set up Christmas card envelopes. I love that you left in the "mistakes" so I could really learn how this was put together. So helpful!
@philipmeese65015 жыл бұрын
this was an awesome video. I've dabbled in AppScript but I learned so much in this video just by watching your approach to this problem. Thank You!
@evacitti5 ай бұрын
I needed to do something very similar and this was an AMAZING solution. Very well explained and easy to follow along. Thank you!
@sangredecristoseminary5 жыл бұрын
This video helped me think differently about how to process donation statements posted in Google Sheets. Noting that the paragraph type is a concern I wondered about how images or drawings inserted into the template document would copy to the body of the document to be printed. I found this is a problem because images/drawings show as type "PARAGRAPH", and the results of the copy are not exactly as that shown in the template document. In my tests the template document has headers and footers with images (such as a logo), which I simply add to the document to be printed since they're static and used for each statement. I wonder if this would be a good addition to the mail merge tutorial, and a challenge for our excellent instructor? Would other subscribers like to see this?
@restorationchurch15095 жыл бұрын
You did an incredible job walking through that very complicated process. I have limited-to-no experience with Javascript, yet I was able to work through this tutorial and successfully create the mail merge I wanted for our fundraiser in Google Drive. I actually appreciated that you misspelled some of the titles because it helped me differentiate between what was a title I gave something and which was a command that I couldn't rename. (Again no experience). I even was able to successfully add an image to my final product with this tutorial base. Ready to laugh? My only problem: I refreshed my Google Sheet (with my source code editor open) because it is connected to a Google Form Survey. When I did, my editor closed, and I'm flummoxed for the moment on how to reopen the editor. Attempts to open the same way as the tutorial in the beginning gives me "Sorry" messages. Told you, no experience! I'll figure it out after awhile. It's saved and named somewhere. Great job! Excellent teacher.
@ExcelGoogleSheets5 жыл бұрын
script.google.com/home
@allisonrosdahl4 жыл бұрын
thank you so much! this helped me not have to write out all of my christmas card addresses!
@good36085 жыл бұрын
yes thank you very much this is also what i needed. i am starting to understand what you are doing after 6 weeks of following your channel. I am building a database for the charity i work for and watching your channel and learning what to do in GS is very helpful.
@santosahernandezmendoza71475 жыл бұрын
A very ingenious way to pass google spreadsheet data to a document. Thank you because it motivates me to study more in depth the topic of Scripts.
@glenntrewitt5 жыл бұрын
This worked well for me. Not for non-programmers, and my doc was simple.
@BrookeAdamsnationwide5 жыл бұрын
What an excellent video! I had to stop and go back several times but this was extremely thorough! I appreciate the fact that you were testing the functions throughout to be sure that it was working properly. I'm not tech savvy at all but this really helped so much. Thanks!!
@kamalhm-dev5 жыл бұрын
Your videos really improve my productivity and makes my life easier. I'm curious, how do you know so much about this? This is not a very popular topic, I wasn't even sure where to find the documentation
@rafaelwendel14005 жыл бұрын
You can actually find all these methods in Google Scripts Documentation (click on the help button on GS UI). I think you might find it surprising because you come from the spreadsheets world or something like that, but it's actually quite simple and popular to create these types of functions, just search for Google Scripts in StackOverflow
@mohsenghafari76524 жыл бұрын
same....
@mohsenghafari76524 жыл бұрын
@@rafaelwendel1400 please more explain . tanks
@Korelucian4 жыл бұрын
How would you place an item where the table has some empty cells, e.g. if I am making a script from a cell where I have sales document, with the source worksheet i have columns named after a product and rows with different branches, some branches might not sell certain items from the table. how can I make the script to add on the mail merge with only the products that has sales value on it
@kokomalt4 жыл бұрын
The tutorial was great and it can be followed easily, thank you for making it!
@BillHeffelfinger9 ай бұрын
Thank you! Super helpful. Two questions I hope you can help with: 1) If I have images in a cell in a sheet and want to merge them into the doc, how would I go about doing this? 2) I need to format dates that get merged into the doc from the spreadsheet. Any suggestions on how to do this? Thanks again!
@XoBebeMore4 жыл бұрын
This was a very great video!! Took some time but I mastered it and saved my company some money!!!
@emmaoben44366 ай бұрын
This is such a good instructional, thank you. Do you have a version which merges to Slides? Trying to adapt but not getting very far!
@erinalilith79625 жыл бұрын
Hi, thank you for this great video.. You basically saved me from a huge headache
@adoleh4 жыл бұрын
Thank you for the tutorial, it was very helpful. I have a question. If the item I am trying to merge is a QR code, what would elType be and how would you code that? The QR codes would be generated in the spreadsheet using the google API. Thanks.
@BAGITUTOR6573 жыл бұрын
Hi, please help. Action in google form checklist mail merge checkbox to google docs? I'm sorry. My leanguge difficult. I hope you understand
@mhilmanad2 жыл бұрын
Thank you for being so helpful; the explanation is straightforward to understand. If I want to send Bulk emails with this pre-made template, how do I do that? Thank you
@govtmiddleschoolbodla2535 Жыл бұрын
can we add images in cells and display in generated pdfs.?
@sixzeroes5226 Жыл бұрын
Great tutorial - I was able free up time spent on a redundant task. Thanks!
@ConstantDylan4 жыл бұрын
Dude, this is amazing and so helpful. You're a champ!
@bassemkhalifa4 жыл бұрын
I am using a 40-col sheet with several hudred rows. I can't get far past 10 rows before the execution times out. A whopping 6 mins! Is there a way to do this so that replacetext isnt running a factorial search? Like hold body[i] on the side while iterating through data[i]. and then appending all the body[i]s to each other.
@ExcelGoogleSheets4 жыл бұрын
What's your code?
@dianatriwulan96123 жыл бұрын
I am sorry. Can i ask how to do this if the template is tables in google docs?
@jesuseduardobittersuarez75173 жыл бұрын
I have multiple rows for echa person, so I need to send a table must of the time to each one, can I do it?
@muharmensuari19554 жыл бұрын
why error when I add listittem Exception: The parameters (DocumentApp.ListItem) don't match the method signature for DocumentApp.Body.appendParagraph.
@guruslakkimar124 жыл бұрын
Yes - i am facing the same issue - did you rectification ! any solutions available ?
@corvandooren22484 жыл бұрын
@@guruslakkimar12 I have created a copy function which works: //copy doc function copyContentDoc(filename=null) { var sourceDoc = DocumentApp.getActiveDocument().getBody(); if(filename === null){ filename = 'Kopie van_'+DocumentApp.getActiveDocument().getName(); } var targetDoc = DocumentApp.create(filename); var totalElements = sourceDoc.getNumChildren(); for( var j = 0; j < totalElements; ++j ) { var targetBody = targetDoc.getBody(); var element = sourceDoc.getChild(j).copy(); var type = element.getType(); var attributes = element.getAttributes(); if( type == DocumentApp.ElementType.PARAGRAPH ){ targetBody.appendParagraph(element); } else if( type == DocumentApp.ElementType.TABLE){ targetBody.appendTable(element).setAttributes(attributes); } else if( type == DocumentApp.ElementType.LIST_ITEM){ targetBody.appendListItem(element).setAttributes(attributes); } else if( type == DocumentApp.ElementType.PAGE_BREAK){ targetBody.appendPageBreak(element).setAttributes(attributes); } else if( type == DocumentApp.ElementType.HEADER_SECTION){ targetDoc.addHeader().setText(element).setAttributes(attributes); } else if( type == DocumentApp.ElementType.FOOTER_SECTION){ targetDoc.addFooter().setText(element).setAttributes(attributes); } // ...add other conditions of DocumentApp.ElementType } targetDoc.saveAndClose(); return true; }
@SiskOZ3 жыл бұрын
when i merge the docs that have an image i get CellImage instead of the image. what am i doing wrong?
@rd20853 жыл бұрын
Does this work with newer apps script in google? I keep getting a error. On the paragraphappend it says the list doesnt match the method. Ill paste the exact message.
@ExcelGoogleSheets3 жыл бұрын
Should work the same. You may have an object of a different type in the document that needs additional handling.
@DR-gq2xs3 жыл бұрын
@@ExcelGoogleSheets I keep getting an error on the createmailmerge. It says the action is not allowed. I'm using the the same doc and formula I've used the last few years and this year is generating error. Do you know of a work around?
@scottgraves53495 жыл бұрын
Is there a way to format the text we are merging to an email? Example, I want a word to be blue and bold. Is there a way to add an attachment in the merge to email?
@seattlebliss31784 жыл бұрын
Thanks for this very helpful tutorial. Works beautifully for my application!
@dylandrake8875 жыл бұрын
Any idea why it's creating an extra copy of the template along with the "merged" version?
@justinwright77883 жыл бұрын
Was this ever figured out?
@templerodgers7687 Жыл бұрын
superb! just what I was looking for! Thank you
@kimjacobs83873 жыл бұрын
This is amazing....! Thank you, thank you...! I am a bit of a spelling nut so that did get me a little, but the way you explain concepts etc and the added pieces about how to see what arguments are available are *fantastic*. I'm hooked..
@studentregistration97085 жыл бұрын
This was awesome, thanks! How do I carry over a table, and could I instead of doing a page break do separate PDFs?
@sarahjaeger10172 жыл бұрын
HELP?! Everything worked until the final run. I am getting this message and I am not sure what to do with it. Thank you! 10:55:14 AM Error Too many changes applied before saving document. Please save changes in smaller batches using Document.saveAndClose(), then reopen the document with Document.openById().
@pjotrpottervogel19902 жыл бұрын
thank you very much, sir! your tutorial made it possible i can generate my 7d2d mod almost automatic WITHOUT TYPOS!!! hell, yeah! ^^
@tonybell92015 жыл бұрын
But what if you want to copy boxes and images as well? I get an error when it hit those.
@TerriEynon3 жыл бұрын
Thank you for this excellent tutorial. You are a very patient teacher. Being able to stop and start umpteen times to see what you actually did was great. I managed to go, in one day, from being a complete Google Spreadsheets novice to the Team Geek able to turn shedloads of data into usable reports. One glitch I couldn't manage to solve: when putting the date '26/10/2021' from a spreadsheet via a template into a report, it comes out as 'Tue Oct 26 2021 00:00:00 GMT+0100 (British Summer Time)'. I've done all the obvious stuff like format the cells in the spreadsheet but it still comes over with the hours and all the unnecessary information. Is there something I should know or another tutorial I need to look at to sort this? Thanks.
@goldenwilliams5 жыл бұрын
I'm having all kinds of problems with this...it says "Cannot find function forEach in object Document. (line 27, file "Code"). HELP! I'm following this as closely as I can.
@mariop42115 жыл бұрын
did you find a solution to this?
@goldenwilliams5 жыл бұрын
@@mariop4211 not yet. I gave up and started using MSword for it
@ExcelGoogleSheets5 жыл бұрын
If it says there is no somevar.forEach that means you had a problem in the line before where you defined somevar.
@mariop42115 жыл бұрын
@@goldenwilliams the problem for me was ensuring that I told the function to include another r(i) value
@mariop42115 жыл бұрын
@@ExcelGoogleSheets First off thanks for the video! Secondly I inputed a table into my template Doc, and it doesn't show in the final Doc. Any advice?
@izharjafri11975 жыл бұрын
Hey just wondering if you can help me in getting input for row number through prompt box for a row record we want to merge in doc
@sylvazhang90225 жыл бұрын
Google Docs currently won't support envelope sizes, so I made a template in Presentations which is A7. Any way I could do a mail merge from Sheets to Presentations?
@ExcelGoogleSheets5 жыл бұрын
The short answer is Yes.
@roycerowan97254 жыл бұрын
How would I use this to update multiple documents at one time? Each row would be mapped to its own google doc. Thanks
@tinman.125 жыл бұрын
Can you tell me what the inside of { } is known as. I want my responses to be blue but do not know how to reference them in the code to ensure that all entries are blue instead of black (blue is for legal, black is for the dead, red is for the living and purple is Royalty)
@phoenixfeather2053 Жыл бұрын
Thank you SO MUCH for your excellent video! I built a mail merge (based on your video) two years ago and it has been working spectacularly .... until yesterday. Now (suddenly) it is throwing an error message: " Error Service Documents failed while accessing document with id xxxxxxx..... " It does not indicate a line or any other information. I have tried running it from a different user - same. I have tried using a different doc with a different id - same. I do not understand why [suddenly] it would not work. Please advise if possible! Again, THANK YOU!!
@TheOneLifeRider Жыл бұрын
have you found a solution?
@codobyte4 жыл бұрын
When I copy a multi-level list (LIST_ITEM's) and would like to add some level in the final doc, the formatting is lost. How can I copy a list AND keep the format in the final doc when the user edits the list?
@mioked5 жыл бұрын
this is amazing...thank you very much for sharing! Is there a way to have it create a new doc each time for each row of data rather than page break on the same doc?
@cleoharding Жыл бұрын
does anyone know how to do this on ipad? with no tool bar at the top?
@srilakshmi11633 жыл бұрын
Hi , I receive a message " service invoked to many times" I just send 20 mails using mail merge. Could help me to send 100 per day?
@leosumantra74762 жыл бұрын
how if the templeate is a tabel and image???
@mrskbela4 жыл бұрын
Excellent video! Very informative and easy to follow by someone who is learning about Apps Scripts. I found your video while looking for an example of how to merge a unique image into each document (similar to what someone might do to batch create employee ID badges or personalized labels). Do you have a video that explains merging unique images or could you point me to a good example and or documentation?
@marcelcharest76624 жыл бұрын
Your're the beat. Thanks from Montréal
@GaryRowe634 жыл бұрын
How can I get the script to add a new line and quoted text into the Doc?
@angelobergomi58694 жыл бұрын
Awesome ! Thanks a lot ! All positive thoughts about your work I would like to share has allready been written below...
@Vladbaklava5 жыл бұрын
I’m merging dollar amounts into a letter. How do I get the 2 decimal places to stay for whole numbers? The worksheet has the decimal places but it’s only pasting the decimals when it’s not a whole number.
@ExcelGoogleSheets5 жыл бұрын
num.toFixed(2);
@Vladbaklava5 жыл бұрын
Learn Google Spreadsheets , where would this be added? After the replaceText? And it’s also taking out the comma from the copied cell as well. Is there a way to copy the display value or to paste it as a currency value with the comma and 2 decimals? ($2,000.00)
@Vladbaklava5 жыл бұрын
Learn Google Spreadsheets , Thanks!So I got the decimals to work by using: .replaceText(“{balance}”, balance.toFixed(2)) Now the only other question is how to get the commas to transfer over or add them back in(for thousands- $1,000.00).
@ExcelGoogleSheets5 жыл бұрын
Write a function or search for a function which I'm sure somebody already wrote online. JavaScript doesn't have native support for currency formatting.
@jimmywebb72693 жыл бұрын
Really enjoyed the tutorial; Help me tremedously
@nwdani21955 жыл бұрын
Your tutorial is awesome. Not only is clear but you also properly designed the steps to show its purpose, in a flow of show-problem and later show-solution. Now is there any technique for automatically populate the 'final doc' whenever new row got added to the 'spreadsheet' without having to manually run the scipt? Cheers
@TheCsillag6665 жыл бұрын
Could you tell me whats happening if i put a table in the template? The script sees that as a paragraph too, so its not like at the ListItem. How can i make work this template with a table in the doc?
@ExcelGoogleSheets5 жыл бұрын
There is no one answer, it depends on what's in the table.
@christiecheng1872 жыл бұрын
Encountered this error TypeError: Cannot read property 'getRange' of null on line 11.... anyone can help? thanks
@arz78614 жыл бұрын
I have a table template in google docs and i want to change the background colour of a cell according to a value. How can i do that?
@ExcelGoogleSheets4 жыл бұрын
google docs or google sheets?
@ExcelGoogleSheets4 жыл бұрын
if google sheets, search for "conditional formatting" videos on the channel
@joelbournival7624 жыл бұрын
I'm having trouble removing the first newline after the copy over. Tried regex and replaceText(/ +$/, ""). Any advice?
@ExcelGoogleSheets4 жыл бұрын
I frankly don't remember what I did in this video at this point. Are you trying to remove the first line of your document?
@joelbournival7624 жыл бұрын
@@ExcelGoogleSheets Yes, I believe that would work too.
@joelbournival7624 жыл бұрын
@@ExcelGoogleSheets I've read some have reduced the line spacing and font size to minimum when copying tables, same looking issue. There has to be a better way?
@adamscottmartin3 жыл бұрын
Hello, great tutorial but I am getting an error with larger dataset using this method. My dataset has 20 columns and around 800 rows. Other than adjusting my script/code to pull in more columns it should be the same as your tutorial. Around 150 rows it stops executing and it gives error "Too many changes applied before saving document. Please save changes in smaller batches using Document.saveAndClose(), then reopen the document with Document.openById()." I'm wondering if the forEach loop is not the most efficient way and wondering if you have any thoughts on this? Sorry I'm a script noob so hope this makes sense!
@ExcelGoogleSheets3 жыл бұрын
It seems like it wants you to close the document after certain number of changes. You could try to just insert the lines opening and closing of the document within the loop and that way it will open a new instance with every turn. Doesn't seem very efficient, but it might work
@Gspuri5552 жыл бұрын
@@ExcelGoogleSheets Hello ! Adam, I faced the same problem. My data set had over 45 columns but the number of columns used for Mail Merge were only 12. I found a workaround, which you might try. From the main Data set create another tab and use a query to fetch only those columns which are used in the mail Merge if a certain column in the main Data set contains "Yes" and paste ID of this tab in the Apps script. This way you will get only those records which you want to mail merge. I hope this works for you. It actually worked for me.
@kilespelz60685 жыл бұрын
Hi, I currently have everything copied exactly as in the example (with the exception of the doc ID's) and I am getting an error code ReferenceError: "docFinal" is not defined. (line 12, file "Code")- what could I be doing wrong?
@ExcelGoogleSheets5 жыл бұрын
many things. to start with make sure the doc file exists, you have the right ID for it and you have permission to use the file.
@krzysztofszeremeta26094 жыл бұрын
Dear. What use this solution for use with postage stamp from pdf list file with image? Poland Post (Envelo)?
@kacheongman27174 жыл бұрын
love your video. Would you like to covered how to mail merge a table in template?
@ErwinOpdenkamp5 жыл бұрын
This is great, I just have to ask if it is possible to get a separate final document for each line in the spreadsheet. Thanks
@Riverwitxh5 жыл бұрын
Yes! Watch the video right through. There's a line of code he adds to create a page break in the function, so you get a separate document for each line of the spreadsheet.
@davidaxelrad86844 жыл бұрын
What is the easiest solution to run this script using the doc as a template and outputting a PDF for repetitive usage from a single line of code?
@alexanderbtodorov3 жыл бұрын
Hello, thanks for the great lessons! Do you have a tutorial how to create invoices generated with data from a Google Sheet and based on Google Docs template, and after the generation in PDF to send the invoices directly to the customers?
@amandawilliams39794 жыл бұрын
I FREAKING LOVE YOU!!! THANK YOU!
@richardsunshine86765 жыл бұрын
Your videos are always great, and I use them extensively. How do you create individual Emails with the appropriate attachment for each recipient?
@srangabayota Жыл бұрын
how to insert image or replace text url to image?
@fakhri02094 жыл бұрын
How do I mail merge with table atribute? The result is only text and no table at all.
@bellatraerealty77273 жыл бұрын
I am getting the same error over and over TypeError: templateparagraphs.forEach is not a function
@bellatraerealty77273 жыл бұрын
can you take a look at the code I wrote so far function myfunction(){} var docTempleteID=""; var docFinalId=""; var wsId="" ; var docTemplete=DocumentApp.openById(docTempleteID); var docFinal=DocumentApp.openById(docFinalId); var ss = SpreadsheetApp.openById(wsId).getSheetByName("westhaven"); var data = ws.getRange (2,1,ws.getLastRow()-1,1.getValues(); var templateParagraphs=docTemplete.getBody().getParagraphs; { createMailMerge(first); createMailMerge(r[0],templateParagraphs, westhaven letter); function createMailMerge(){ templateparagraphs.forEach(function(p){ p .copy() .replaceText("{first}","first"){}
@dboersma3 жыл бұрын
@@bellatraerealty7727 after the .getParagraphs you are missing a () change it to .getParagraphs();
@migueldemaria38304 жыл бұрын
That's a very helpful vid, thanks a lot!
@ezequielpardo62175 жыл бұрын
I used this method to mail merge a report that I am running daily. Is there a way to add a function that will duplicate the google, rename it and open the duplicated Doc?
@classicguy78134 жыл бұрын
Hi Guru and beyond of Apps Script guy! Sir how do we replace links with pictures and let the google do the backend job for pasting pictures to google docs
@CHETANSOMASHEKAR5 жыл бұрын
How to put a table in google doc template and send data from google sheets to doc table?
@mohsenghafari76524 жыл бұрын
hi .. i have this error : Too many changes applied before saving document please help me
@elsgrupovino73144 жыл бұрын
Can you insert an image in this mail merge?
@mohsenghafari76524 жыл бұрын
Hi do you solved this problem?
@joelsigue83992 жыл бұрын
is it possible to insert a SQL query in the script and make use of "where" to filter? thank you for the very useful video.
@ExcelGoogleSheets2 жыл бұрын
No, but you can use JavaScript filter method kzbin.info/www/bejne/hoXChXeegs2Kqac
@abdullahquhtani42475 жыл бұрын
I hope you reply to this. Is it possible to do this with google forms so email will be sent right after submission. I’m sure many ppl need this as well as I do. I can pay you for modification that match my needs.
@ExcelGoogleSheets5 жыл бұрын
kzbin.info/www/bejne/fmi6d56qa69nqNU
@subhashshekhar2402 жыл бұрын
how if same person having multiple address & i want to to send both the address in samemail doc
@ExcelGoogleSheets2 жыл бұрын
I think if you separate those emails by comma or semicolon on the spreadsheet, it should work.
@subhashshekhar2402 жыл бұрын
@@ExcelGoogleSheets I am really thankful to you for a reply. I am having data in Excel Name Ram ,Sham,Ram Amount 10, 20, 15 Note comma defined as different in different cell . I want to share doc to ram that he got 10 & 15 in a single. How can I do that, in your video names are unique values.
@ExcelGoogleSheets2 жыл бұрын
@@subhashshekhar240 You could do this all in code, but it would be quite complicated. What you could do instead is create a report from this data with unique names and their respective combined results using formulas and then use that data.
@mikebeatonmusic5 жыл бұрын
Is there a way to do this but create separate google docs?
@gogoulor5 жыл бұрын
Hi. Works perfect, very explicit method. Q: I have inserted an image in a cell, then, how could i do If i want that image in my final document ? Regards.
@shinichi0noT4 жыл бұрын
Have you figured it out?
@dfpdesignforpeace29454 жыл бұрын
Thanks so much for this useful demo. It worked brilliantly! Is there a way to 'getTables' along with their contents? My Template document contains a table with a complex layout. Is that hard to handle?
@sarfarazm55685 жыл бұрын
Hi wonderful app , What do we do if we want to draft this drafts in gmail draft folder with the email and all the document
@jakenaylor5 жыл бұрын
This is an amazing video. Keen to check out some more of your videos! Cheers. :D
@Sunbyte-io4sh7 ай бұрын
how can fetch table from google Doc Template?
@ericaponte98783 жыл бұрын
Help! I did the exact same thing as you (i think) but it shows action not allowed :(
@jkevinAH4 жыл бұрын
my template has a letter on the 1st page only (the whole template has 2 pages), ive replicated your tutorial and it works but the header is not copied :( also ive noticed that for the numbered lists (instead of bullet points), my problem is the number lists continues from one copy to the next so my last copy has numbered lists starting from 50. instead of 1.
@phoenixr56195 жыл бұрын
Great Video!! How would I translate that into Labels? I get the {name}, Etc, Etc.... but how would I format that into the final spaced as labels? For instance, could I upload a label template (word) into google drive and use this to translate INTO the word doc??
@michaelwood99673 жыл бұрын
I had the same questions and after a lot of tinkering, got it to work. You need to append a Table to the final doc first and pass it to the mailMerge function. Then, inside the mailMerge function (before the forEach statement), you append a row to the table and set the row's minimum height to the height of your label. You also append a cell to the row. Then, inside the forEach statement, append the mail merge data (from this tutorial) to the cell. In my case, I wanted two columns of labels, so in the final doc, I manually set it to be two columns. I couldn't find a way do do that with Google Scripts, but fortunately, formatting it to two columns works just great. The table cell fills the entire width of the column (or document if you don't make columns). Finally, because a table has to have a paragraph before it, it seems to mess up the first column of labels on the first page. I was able to fix this by using google scripts to set the final document body font to size 1 and the document spacing to .06. You can't tell the paragraph is there and my labels work great! Lifesaver for my own project and this tutorial got me started! Thanks!
@mohsenghafari76524 жыл бұрын
Hi. I need to insert picture from google drive to my doc..i have picture linke to sheet ..how can I do it? Tanks
@mr_k4tz5 жыл бұрын
Great tutorial. Is there a way to select from multiple of templates based on the contents of a cell? for example if a cell says "x" use template "x", but if a cell says "y" use template "y" etc?
@rj.laluyan3 жыл бұрын
Create 2 templates, get the ID, set var for each of them. Use if condition in the script pointing to the template (x or y).
@mirfanalfian83132 жыл бұрын
Thank you very much for the video, it help me a lot for my work.