链接的图片在Excel Workbook中以PDF打印之前,不会更新以PDF的更新
上下文:我有一个Excel报告,我将所有步骤都与VBA自动化。一旦我所有的VBA代码都可以吸入并更新报告中的数据,我将导出名为“每周报告”的表格,并将其附加到Outlook电子邮件中。
问题:从名为“每周表”的工作表上的表中,我复制了一张桌子,并将其粘贴到“每周报告”工作表中,用作``链接的''图片'。我期望此链接图片更新并反映数据更新后表中的值,但是在PDF上,它没有反映参考表中所做的任何更改。
我尝试过的内容:我找到表可以更新的唯一方法是我手动浏览屏幕以查看链接的图片,片刻后它会在其中更新。
问题:是否有一种方法可以使用VBA更新子例程过程中同一工作簿内的Excel表的链接图片?
这是我用来将工作表打印为PDF的代码:
wb.Worksheets("Weekly Report").ExportAsFixedFormat Type:=xlTypePDF, fileName:=print_file, Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=True
Context: I have an Excel report where I automated all the steps with VBA. Once all my VBA code to pull in and update the data in the report has run, I export the sheet named "Weekly Report" to PDF and attach it to an outlook email.
Issue: From a table on a worksheet named "Weekly Tables", I copied a table and pasted it onto the "Weekly Report" Worksheet as a 'linked picture' using paste-special. I expected this linked picture to update and reflect the values in the table after the data is updated, but on the PDF it doesn't reflect any changes made in the referenced table.
What I've tried: The only way I have found the table to be able to update is if I manually go and navigate my screen to be viewing the linked picture, where it updates after a few moments.
Question: Is there a way to use VBA to update a linked picture of an excel table that is within the same workbook during the course of a subroutine?
This is the code I use to print the worksheet as a PDF:
wb.Worksheets("Weekly Report").ExportAsFixedFormat Type:=xlTypePDF, fileName:=print_file, Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=True
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论