View Full Version : Solved: Saving merged document into individual file
tinyau01
12-22-2008, 02:36 AM
Hi all,
I followed the instruction here (kb/getarticle.php?kb_id=139#instr, can't post the full link as my post count is 0) and every individual file saved has an extra blank page (a different section no. as well) at the end.
Does anyone know the reason?
Thanks in advance.
lucas
12-22-2008, 11:17 AM
Try this one. It seems to directly address the extra page problem:
http://vbaexpress.com/kb/getarticle.php?kb_id=727
tinyau01
12-22-2008, 06:13 PM
Thanks for your reply, Lucas.
But the suggested link divides a 4 pages document into 4 files and all formatting is gone as well.
tinyau01
12-22-2008, 08:44 PM
Please refer to attachment for my scenario.
Test.xls is the file with data to be merged to Test.doc
Test_1.doc is the file generated after "Merge to New Document"
1.doc is the file generated using the macros in vbaexpress(dot)com/kb/getarticle.php?kb_id=139#instr.
Thanks.
lucas
12-22-2008, 08:52 PM
Your zip file seems to be corrupt. Could you zip them up again and try to upload it? If that doesn't work just post one one each of two posts...
tinyau01
12-22-2008, 09:27 PM
Please kindly try again. Thanks.
lucas
12-22-2008, 11:12 PM
Do you want apple1 and apple2 to be on different pages or on the same page?
tinyau01
12-22-2008, 11:13 PM
Different page.
lucas
12-22-2008, 11:17 PM
I'm sorry, different or the same document......Do you want Apple1 on page 1 and apple2 on page 2 of the same document?
tinyau01
12-22-2008, 11:20 PM
Yes, please.
Thanks
lucas
12-22-2008, 11:31 PM
Keep these two files in the same directory and run the excel file.....click the button. The files will be created in the same directory as the excel file and the tpl.dot.
If this works for you it is much easier than the mailmerge (at least for me) that you were trying to run.
tinyau01
12-23-2008, 12:30 AM
Thank you again, Lucas.
Really appreciate your time in writing new codes. However, I believe I gave a misleading example.
In fact, I'm trying to compose something like a letter with just part of the document (e.g. Name) linked to the excel.
Please kindly refer to the attachment again.
lucas
12-23-2008, 12:43 AM
I may be missing something here. I hope I'm helping you. If I understand correctly then this will work for your need.
You can open the tpl.dot and format things anyway you want them and just put a bookmark(bm_1) where you want the name to be placed.....anywhere on the page.
If I'm completly off base, please say so. I just don't have your mailmerge so I'm working from the excel file trying to accomplish your goal.
tinyau01
12-23-2008, 12:56 AM
I apologize for not giving you the mailmerge as it contains confidential information of my company.
The example I gave was a simplified version of what I'm doing. The mailmerge contains numbers of tables and fields linked to the excel. Therefore, it would be easier if you could help in resolving the extra blank page problem.
However, your provided solution helped in my other tasks. Thanks!
lucas
12-23-2008, 01:04 AM
Ok, so you need to work from the merged word document, correct?
If so, I will take another look at this while confessing to not being a really strong word person. I'm better in excel. Maybe one of the regular word guys will drop in to give us a little help too. It's a little late tonight so will return to this tommorrow......
tinyau01
12-23-2008, 01:25 AM
That's right.
Every time there are changes to our product, I can simply change the data (e.g. name of the package, pricing, options available, etc.) in the Excel and mailmerge to the Word document.
With VBA, I can save the New Document into individual files. Otherwise, I have to manually click next record and save a new file. This is very time consuming (and boring) considered that there's nearly a thousand files needed each time.
Again, thanks for your time.
tinyau01
12-23-2008, 02:46 AM
I solved my own problem finally. :content:
Just change the "Section Start" under "Page Setup" to "Continuous" and the blank page is gone after running the macro.
lucas
12-23-2008, 12:34 PM
How amazingly simple. Thanks for sharing your solution.
Be sure to mark your thread solved using the thread tools at the top of the page.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.