How to resize a screen capture and paste smaller


gyro2222

New member
Local time
10:39 PM
Posts
2
OS
windows 11
I often use the snipping tool to capture a section of the screen,
I need a macro that will paste the capture at a specific size.

one suggestion, which doesn't seem to work was:
style='color:#111111'>Sub PasteAndResizeImageInCurrentEmail()
Dim objInspector As Inspector
Dim objDoc As Object
Dim objSelection As Object
Dim objShape As Object

' Get the current inspector
Set objInspector = Application.ActiveInspector
If Not objInspector Is Nothing Then
' Get the document and selection
Set objDoc = objInspector.WordEditor
Set objSelection = objDoc.Application.Selection

' Paste the image from the clipboard
objSelection.Paste

' Resize the image
Set objShape = objDoc.InlineShapes(1)
With objShape
.LockAspectRatio = msoTrue
.Width = 200 ' Set the width in points
End With
Else
MsgBox "No active email window found.", vbExclamation
End If
End Substyle='font-size:12.0pt;color:#111111'>
 

My Computer

System One

  • OS
    windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    alienware
I am not exactly sure what your question is.

The macro you provided (when cleaned up) does past the current clipboard image contents into the current email body at the insertion point and then resizes it to 200 points wide.

Are you trying to instead change the font size and color of any text that is on the clipboard when it is pasted?

Public Sub PasteAndResizeImageInCurrentEmail() Dim objInspector As Inspector Dim objDoc As Object Dim objSelection As Object Dim objShape As Object Set objInspector = Application.ActiveInspector If Not objInspector Is Nothing Then Set objDoc = objInspector.WordEditor Set objSelection = objDoc.Application.Selection objSelection.Paste Set objShape = objDoc.InlineShapes(1) With objShape .LockAspectRatio = msoTrue .Width = 200 ' Set the width in points End With Else MsgBox "No active email window found.", vbExclamation End If End Sub
 

My Computer

System One

  • OS
    Windows 10, Windows 11
    Computer type
    PC/Desktop
I'm having trouble inserting it as a vba command.
see the attached
Thanks,
Hal
 

Attachments

  • Screenshot 2025-05-12 085348.webp
    Screenshot 2025-05-12 085348.webp
    188.4 KB · Views: 1

My Computer

System One

  • OS
    windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    alienware
Looks complicated, I use SnagIt and just tell the editor to resize. :-)
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2, Build 26100.4061, Experience Pack 1000.26100.84.0
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 Nvme PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Security
  • Operating System
    Windows 11 Pro 24H2, Build 26100.4061, Experience Pack 1000.26100.84.0
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Mouse
    Logitech G305
    Keyboard
    Microsoft Comfort Curve 2000
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Security
If posting on this or other forums I just use the Snipping Tool, paste it in the click the image to get it outlined then drag one corner toward the middle to make smaller keeping the high to wide ratio the same. It doesn't work on the Windows 10 Help Forums as I can't paste directly, have to Save then Insert the image.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
Back
Top Bottom