You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何禁用PowerPoint 2016图片自动调整功能?解决VBScript粘贴失真问题

Fixing Image Distortion in PowerPoint 2016 with VBScript

Hi Yash, sorry to hear your QlikView-to-PowerPoint image workflow broke after upgrading to Office 2016—this automatic image resizing behavior is a common gotcha with newer PowerPoint versions. Here’s how to disable it in your VBScript to get crisp, correctly sized images again:

1. Disable Automatic Image Scaling in Your Script

The root issue is PowerPoint 2016’s default setting to auto-scale inserted images to fit the slide dimensions. Override this by setting the PictureInsertionBehavior property before you paste or insert the image:

' Assuming you already have a reference to your PowerPoint application object
pptApp.Options.PictureInsertionBehavior = ppInsertPictureAsOriginalSize

The ppInsertPictureAsOriginalSize constant has a value of 2—if you get an error referencing the constant directly, you can use the numeric value instead.

2. Lock Aspect Ratio & Adjust Dimensions Properly

After pasting the image, make sure to lock its aspect ratio to prevent distortion, and base any resizing on the original image dimensions (not the auto-scaled version):

' Paste the image from clipboard
Set pptSlide = pptPresentation.Slides(YourSlideNumber)
pptSlide.Shapes.Paste
Set pastedImage = pptSlide.Shapes(pptSlide.Shapes.Count)

' Lock aspect ratio to avoid stretching
pastedImage.LockAspectRatio = msoTrue ' msoTrue = -1, can use numeric value if needed

' Optional: Resize based on original dimensions (example: 90% of original size)
originalWidth = pastedImage.Width
originalHeight = pastedImage.Height
pastedImage.Width = originalWidth * 0.9
pastedImage.Height = originalHeight * 0.9

3. Verify No Hidden Auto-Adjust Settings

If you still see distortion, double-check that your script isn’t accidentally triggering any other auto-adjust features. Avoid using ShapeRange.ScaleHeight or ScaleWidth with relative scaling unless you’re sure the base size is the original image size.

Manual Setting (For Reference)

If you ever need to disable this behavior for manual use, go to:

  • File > Options > Advanced
  • Scroll to the Image Size and Quality section
  • Check the box for Insert pictures at their original size

This matches what the script does with PictureInsertionBehavior, but the script method is critical for your automated workflow.

内容的提问来源于stack exchange,提问作者Yash_792

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:16:28