PDA

View Full Version : Resizing Inkpicture ink before pasting



shim3001
07-24-2024, 06:51 AM
Hi,

Is there any way to resize the ink from an inkpicture control before pasting from a userform to a bookmark in Word.

Current code

InkPicture1.Ink.ClipboardCopy
ActiveDocument.Bookmarks("signature").Select
Selection.Paste

However due to the current size of the inkpicture control on the userform being large to input a signture, it pastes at the same size into the bookmark on the word document.
I was wondering if there was a way to resize the ink before pasting into the document.

Any help would be appreciated.

Aussiebear
07-24-2024, 02:38 PM
This section of code adjusts your image size. Perhaps this might give you some ideas?


Sub PicResize()
Dim PercentSize As Integer
PercentSize = 75
If Selection.InlineShapes.Count > 0 Then
Selection.InlineShapes(1).ScaleHeight = PercentSize
Selection.InlineShapes(1).ScaleWidth = PercentSize
Else
Selection.ShapeRange.ScaleHeight Factor:=(PercentSize / 100), RelativeToOriginalSize:=msoCTrue
Selection.ShapeRange.ScaleWidth Factor:=(PercentSize / 100), RelativeToOriginalSize:=msoCTrue
End If
End Sub