Consulting

Results 1 to 2 of 2

Thread: Resizing Inkpicture ink before pasting

  1. #1
    VBAX Newbie
    Joined
    Sep 2022
    Posts
    3
    Location

    Resizing Inkpicture ink before pasting

    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.
    Last edited by georgiboy; 07-24-2024 at 07:17 AM. Reason: Added code tags

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,427
    Location
    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
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •