此主题相关图片如下:b8c7a4b5af46a9e3a01ff2ece5a9257.png
此主题相关图片如下:47efae089f5ddbfb13de086b4fcf8a4.png
因实际工作中,每份资料打印的份数是不同的,有个需要打印3张,有的需要打印2张,而分开单独点击一次打印一张效率太低,有没有办法按照指定列标记的数字当做打印数量,数字标记几,就打印几次?
此主题相关图片如下:3fd6c25eff63535c2bdf2ba8dfaa7d4.png
因为我做的是服装行业,需要在每件衣服挂上单独挂牌给客人,每个款式挂牌的数量都不一样,又想提高效率,请教一下如何实现不同数量的批量打印
此主题相关图片如下:cb80737bc9283727bb5c19d58121ab5.jpg
Dim fl As String = ProjectPath & "Reports\寄样衣记录.xls"
Dim App As New MSExcel.Application
for i as integer = 0 to tables("寄样衣记录").rows.count - 1tables("寄样衣记录").position = iDim Book As New XLS.Book(ProjectPath & "Attachments\寄样衣记录.xls")
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
try
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl)
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
Ws.PrintOut(Copies:=tables("寄样衣记录").rows(i)("QTY"))
Wb.clsoe
Catch ex As Exception
MessageBox.Show(ex.message)
Wb.clsoe
End try
Application.DoEvents
next
App.Quit
[此贴子已经被作者于2024/12/24 12:05:53编辑过]