Edit Excel Macros command duplex print Excel2003 table

Source: Internet
Author: User

You can easily set up double-sided print Word documents in the Word2003 Print dialog box, but there is no setup option for duplex printing in Excle2003. Users can implement double-sided printing Excel2003 tables by editing macro commands in Excel2003.

1. Edit Excel2003 Macros Command

The first time you use the macro feature in Excel2003, you need to add a Personal macro workbook (that is, Pernosal.xls), and then use the Visual Basic Editor to edit the double-sided printed Macro command. The procedure is described as follows:

Step 1th, open Excel2003, click the tools → macros → record new macros menu command in the Excel2003 window to open the Record New Macro dialog box. Enter any name in the Macro name edit box, and then select the Personal Macro Workbook option in the Save in Drop-down menu, and click OK, as shown in Figure 2008070501.

Figure 2008070501 Selecting the Personal Macro Workbook option

Step 2nd, click the Stop Recording button in the Open Recording Macro toolbar, and Excel2003 can automatically add the Personal Macro Workbook, as shown in Figure 2008070502.

Figure 2008070502 Click the Stop Recording button

Step 3rd, in the Excel2003 window, click tools → macros → Visual Basic Editor menu commands to open the Visual Basic Editor window. Right-click the VBAProject (pernosal) in the Project pane on the left. XLS) option, select the Insert → module menu command to insert Module 1, as shown in Figure 2008070503.

Figure 2008070503 Selecting the Insert → module command

Step 4th, double-click Module 1 to open the Code Input window and enter the following code:

Sub dy ()

On Error Resume Next

x = ExecuteExcel4Macro ("Get.document (50)")

For i = 1 to Int (X/2) + 1

ActiveWindow.SelectedSheets.PrintOut from:=2 * i-1, to:=2 * i-1

Next I

MsgBox "Please put the printed paper back into the paper slot", vbOKOnly, "Print the Other Side"

For j = 1 to Int (X/2) + 1

ActiveWindow.SelectedSheets.PrintOut from:=2 * J, To:=2 * j

Next J

End Sub

Click the file → save menu command When you are finished, and close the Visual Basic editing window to return to the Excel2003 window, as shown in Figure 2008070504.

Figure 2008070504 Input Code

2. Add two-sided printing button on the toolbar

Step 1th, in the Excel2003 window, execute the tools → customize menu commands, and open the Customize dialog box. In the Commands tab, in the Categories list, select the Macros option, and then drag the custom button option in the Commands list to the appropriate location on the toolbar, as shown in Figure 2008070505.

Figure 2008070505 Dragging the custom button option

Step 2nd, select the custom button you just added, and in the Customize dialog box, click the Change Selection button. Edit the named edit box on the Open shortcut menu, enter a name for the custom button (such as "Duplex Printing"), and select the Always use Text option, as shown in Figure 2008070506.

Figure 2008070506 Naming a custom button

Step 3rd, keep the Customize dialog box open, and then right-click the Duplex button that you just added on the toolbar, and then click Specify Macros on the shortcut menu that opens, as shown in Figure 2008070507.

Figure 2008070507 Click the Specify Macros command

Step 4th, open the Macros dialog box, select the macros you edited beforehand, and click OK, as shown in Figure 2008070508.

Figure 2008070508 The Specify Macros dialog box

Step 5th, close the Customize dialog box and return to the Excel2003 window.

3. double-sided Printing Excel2003 Form

Open the Excel2003 file that requires duplex printing, and in the toolbar, click the Duplex button. Excel2003 Prints the odd pages first, and then opens the "Open another Side" dialog box, prompting the user to flip the paper back into the printer's paper slot. Click OK to print even pages on the other side, enabling double-sided printing, as shown in Figure 2008070509.

Figure 2008070509 Replacing the paper print surface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.