Dim App As New MSExcel.Application Dim Wb = App.Workbooks.Open("g:\test.xls") Dim Ws = Wb.Worksheets(1) Dim pname As String = "fax" on error resume Next For i As Integer = 0 To 10 app.activeprinter = pname & " 在 Ne" & Format(i, "00") & ":" Next msgbox(app.activeprinter)