PDA

View Full Version : Bizhub C203/FS519 - Mailmerge-stapling


Custom Search


Techno Sid
10-12-2009, 11:03 AM
When trying to do a mailmerge from MS Word & the address list is in Excel, the whole set is stapled as one, instead of individual sets. I beleive that this is an issue within Word & a macro needs to be embedded in the document. Customer is using Word 2000 & 2003. Does anyone have a copy of the macro, or know where to get it from?

Mr Spock
10-12-2009, 12:03 PM
This is a mail merge issue. Do a search on the Microshaft website and you should see several solutions depending on which version you are using. I have also seen a post on a website on how to write the macro as well. Just google mail merge and you should be able to find it.

Here is one such site.

MSWord Mail Merge (http://www.digitalissues.co.uk/html/app/mailmerge.html)

Kbros
10-12-2009, 03:21 PM
Applying printer finishing options in a Microsoft Word Mail Merge

Many printers perform finishing at the job level. Stapling, for example, can only be done at the end of a job, not within a job. This presents a problem when working with Microsoft Word mail merges. Word creates a merge as one file (job) containing all of the merge records, so it’s not possible to do the merge to the printer and apply finishing options to individual records.

Here’s a work-around. First, make sure the target printer is the default Windows printer. Then set the defaults of the print driver for whatever you need, such as stapling, duplexing, specific tray for the first sheet, etc. Setting driver defaults varies a bit depending on the OS. From within the Printer Folder, right-click the printer and choose ‘Properties’ in Win 9x, ‘Document Defaults’ in Win NT, or ‘Printing Preferences’ in Win 2k. Make sure you remember to ‘Apply’ or ‘Ok’ the settings changes you make before closing the driver screens. Next, run the mail merge and choose ‘New Document’, instead of ‘Printer’. Word creates the merge in memory, visible on the screen. Now, run the following macro.


Sub Mail_Merge_Print()
'
' Mail_Merge_Print Macro
' Macro written 05/08/00 by Len Hoyt
‘ lhoyt@ikon.com
'
Application.ScreenUpdating = False

Rem Selection.HomeKey Unit:=wdStory

Selection.Find.ClearFormatting

With Selection.Find
.Forward = True
.Wrap = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With

Do
Selection.Extend
Selection.Find.Execute FindText:="^b"
If Selection.Find.Found = False Then Exit Do
Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Application.PrintOut Range:=wdPrintSelection, Background:=False
Selection.MoveDown Unit:=wdLine, Count:=2, Extend:=False
Loop

End Sub


The first line turns screen updating off while the macro runs. This decreases processing time considerably. You can remark this line out if you want to see the macro work on screen, but it’s really too fast to follow anyway, and it slows overall execution.

The second line won’t run unless you remove the ‘Rem’ (remark). It moves the cursor to the start of the merge document when the macro begins. If you leave the remark, or remove the line completely, the macro will run from where you’ve placed the cursor. This gives you an easy method for testing (or job recovery). Set up the print driver the way you want it and position the cursor on the first line of a record near the end of the file. Run the macro and you’ll get the records from the cursor position to the end of the file. Just remember when you start a full job to place the cursor at the beginning of the file!

The next lines, all the way to ‘End With’ just set up the parameters of the upcoming search. These lines may not even be necessary, since they’re defaults anyway, but it’s good housekeeping just in case they’ve been changed in a previous search.

The Do Loop is where the work is actually done. Here, the macro turns on Extend mode and selects (highlights) the text between the current cursor position and the next “^b” (section break) it finds. It then sends this selection as a print job to the default Windows printer. When the job has been sent, the cursor position is advanced to the top of the next record and the process is repeated until there are no more section breaks. Notice that Background printing is turned off. I like multi-tasking as much as the next guy, but I hate to push it in an environment like this. Feel free to change it.

There are a number of ways to install the macro. The following method is not the most straight forward, but it’s pretty simple and it makes it unlikely that you’ll screw up existing macros. If you know and prefer another way, by all means, use it. Otherwise, open this file on the workstation that will be doing the mail merge. Select (highlight) the text of the macro from ‘Sub Mail_Merge_Print()’ to ‘End Sub’, inclusive. On the Word toolbar, select ‘Edit’ and ‘Copy’. Next, select ‘Tools’, ‘Macro’, ‘Record New Macro’. Make the new macro name ‘Mail_Merge_Print’ and click ‘Ok’. Click the ‘Stop’ button to exit record mode (we’re not actually recording anything). Now, select ‘Tools’, ‘Macro’, ‘Macros’. In the dialog box, select ‘Mail_Merge_Print’ and click ‘Edit’. In the code window, select everything from ‘Sub Mail_Merge_Print()’ to the first (maybe only) ‘End Sub’, inclusive. On the Word toolbar select ‘Edit’ and ‘Clear’ (that’s ‘Clear’, not ‘Cut’!), then select ‘Edit’ again and ‘Paste’. Close all open windows, and exit Word. The new macro will be available the next time you open Word. To use it, select ‘Tools’, ‘Macro’, ‘Macros’ and double-click it, or select it and click ‘Run’. Don’t forget about the cursor position.

4evertech
06-04-2012, 08:59 PM
This macro appears to be cutting off a few lines and the bottom of our mail merged letter and the footer when the job prints in MS Word 2010. Do you have any ideas why?



Applying printer finishing options in a Microsoft Word Mail Merge

Many printers perform finishing at the job level. Stapling, for example, can only be done at the end of a job, not within a job. This presents a problem when working with Microsoft Word mail merges. Word creates a merge as one file (job) containing all of the merge records, so it’s not possible to do the merge to the printer and apply finishing options to individual records.

Here’s a work-around. First, make sure the target printer is the default Windows printer. Then set the defaults of the print driver for whatever you need, such as stapling, duplexing, specific tray for the first sheet, etc. Setting driver defaults varies a bit depending on the OS. From within the Printer Folder, right-click the printer and choose ‘Properties’ in Win 9x, ‘Document Defaults’ in Win NT, or ‘Printing Preferences’ in Win 2k. Make sure you remember to ‘Apply’ or ‘Ok’ the settings changes you make before closing the driver screens. Next, run the mail merge and choose ‘New Document’, instead of ‘Printer’. Word creates the merge in memory, visible on the screen. Now, run the following macro.


Sub Mail_Merge_Print()
'
' Mail_Merge_Print Macro
' Macro written 05/08/00 by Len Hoyt
‘ lhoyt@ikon.com
'
Application.ScreenUpdating = False

Rem Selection.HomeKey Unit:=wdStory

Selection.Find.ClearFormatting

With Selection.Find
.Forward = True
.Wrap = False
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With

Do
Selection.Extend
Selection.Find.Execute FindText:="^b"
If Selection.Find.Found = False Then Exit Do
Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Application.PrintOut Range:=wdPrintSelection, Background:=False
Selection.MoveDown Unit:=wdLine, Count:=2, Extend:=False
Loop

End Sub


The first line turns screen updating off while the macro runs. This decreases processing time considerably. You can remark this line out if you want to see the macro work on screen, but it’s really too fast to follow anyway, and it slows overall execution.

The second line won’t run unless you remove the ‘Rem’ (remark). It moves the cursor to the start of the merge document when the macro begins. If you leave the remark, or remove the line completely, the macro will run from where you’ve placed the cursor. This gives you an easy method for testing (or job recovery). Set up the print driver the way you want it and position the cursor on the first line of a record near the end of the file. Run the macro and you’ll get the records from the cursor position to the end of the file. Just remember when you start a full job to place the cursor at the beginning of the file!

The next lines, all the way to ‘End With’ just set up the parameters of the upcoming search. These lines may not even be necessary, since they’re defaults anyway, but it’s good housekeeping just in case they’ve been changed in a previous search.

The Do Loop is where the work is actually done. Here, the macro turns on Extend mode and selects (highlights) the text between the current cursor position and the next “^b” (section break) it finds. It then sends this selection as a print job to the default Windows printer. When the job has been sent, the cursor position is advanced to the top of the next record and the process is repeated until there are no more section breaks. Notice that Background printing is turned off. I like multi-tasking as much as the next guy, but I hate to push it in an environment like this. Feel free to change it.

There are a number of ways to install the macro. The following method is not the most straight forward, but it’s pretty simple and it makes it unlikely that you’ll screw up existing macros. If you know and prefer another way, by all means, use it. Otherwise, open this file on the workstation that will be doing the mail merge. Select (highlight) the text of the macro from ‘Sub Mail_Merge_Print()’ to ‘End Sub’, inclusive. On the Word toolbar, select ‘Edit’ and ‘Copy’. Next, select ‘Tools’, ‘Macro’, ‘Record New Macro’. Make the new macro name ‘Mail_Merge_Print’ and click ‘Ok’. Click the ‘Stop’ button to exit record mode (we’re not actually recording anything). Now, select ‘Tools’, ‘Macro’, ‘Macros’. In the dialog box, select ‘Mail_Merge_Print’ and click ‘Edit’. In the code window, select everything from ‘Sub Mail_Merge_Print()’ to the first (maybe only) ‘End Sub’, inclusive. On the Word toolbar select ‘Edit’ and ‘Clear’ (that’s ‘Clear’, not ‘Cut’!), then select ‘Edit’ again and ‘Paste’. Close all open windows, and exit Word. The new macro will be available the next time you open Word. To use it, select ‘Tools’, ‘Macro’, ‘Macros’ and double-click it, or select it and click ‘Run’. Don’t forget about the cursor position.

TheOwl
06-04-2012, 11:52 PM
Try this one. I have been giving this to customers to use for years. It is for older versions of Word, but the pricipal should be the same.

16123

Custom Search