Private Sub CommandButton8_Click 记录卡批量插入照片 宏在 2020-1-1 由 YangZiwen 创建 Dim MyDialog As FileDialog vrtSelectedItem As Variant doc As Document 定义一个文件夹选取对话框 Set MyDialog = Appli
This macro is used to insert multiple photos into a batch of Word documents. It begins by opening a file dialog box and allowing the user to select one or more Word documents to be processed. The macro then prompts the user to enter the width and height of the photos to be inserted, as well as the first and last photo numbers to be processed.
For each selected document, the macro inserts a page break and then inserts the template file "模板(插入照片).doc" which contains placeholders for the MaterCode and EquipName bookmarks. The macro then loops through the specified range of photo numbers and resizes each photo to the user-specified dimensions. Finally, the macro saves and closes each processed document.
At the end of the macro, a message box is displayed to indicate that the batch photo insertion process is complete.
原文地址: https://www.cveoy.top/t/topic/blN8 著作权归作者所有。请勿转载和采集!