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.

批量插入照片到 Word 文档 - VBA 宏

原文地址: https://www.cveoy.top/t/topic/mObe 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录