+ Reply to Thread
Results 1 to 6 of 6

Activating MS paint from Excel thru VBA

  1. #1
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Activating MS paint from Excel thru VBA

    Hi,
    Please can somebody help me on how to call MS paint from MS excel (2003) and paste the picture in clipboard to paint and save the file in paint. Following is the macro I wrote in VBA and it is not working.
    Please Login or Register  to view this content.
    Last edited by royUK; 05-27-2009 at 03:44 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Activating MS paint from Excel thru VBA

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Activating MS paint from Excel thru VBA

    I have added Code Tags, be sure to use them yorself in future


    Try this
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Activating MS paint from Excel thru VBA

    My host drive is D and therefore till that part is ok. What I could no do was sending the key values to Paint. The last two lines before End Sub

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-19-2012
    Location
    Amberg
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Activating MS paint from Excel thru VBA

    Hi,

    You have to wait, take it easy....

    Please Login or Register  to view this content.
    Last edited by arlu1201; 07-19-2012 at 08:55 AM. Reason: Use code tags in future.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Activating MS paint from Excel thru VBA

    Quote Originally Posted by nemeth.gabor View Post
    Hi,

    You have to wait, take it easy....

    The thread is 3 years old[/b]
    Sub Screen_Capture_VBA()
    Dim Sec1 As Date, PasteYes As Integer

    Sec1 = DateAdd("s", 0, Now)
    Do Until Now > Sec1
    DoEvents
    Loop
    ScreenCapture Shell "mspaint.exe", vbMaximizedFocus
    Sec1 = DateAdd("s", 0, Now)
    Do Until Now > Sec1
    DoEvents
    Loop
    Application.SendKeys ("^v")
    Application.SendKeys ("^s")
    End Sub

    Use code tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1