Solved

TimCottee

Posted on 2001-06-06
4
126 Views
Last Modified: 2010-05-02
Nuisance that i am could you just extend the last answer to show me how to save a bmp to wordpad doc with the date attached?
0
Comment
Question by:leachim
  • 2
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 100 total points
ID: 6160621
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _
    hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
    lParam As Any) As Long
Private Const WM_PASTE = &H302

Private Sub Command1_Click()
   
    Dim myPicture As StdPicture
   
    Set myPicture = LoadPicture("C:\my documents\search.gif")

    RichTextBox1.Text = Format(Date, "M/dd/yyyy")
    InsertPictureInRichTextBox RichTextBox1, myPicture
    RichTextBox1.SaveFile "C:\my documents\testbmp.doc"

End Sub


Sub InsertPictureInRichTextBox(RTB As RichTextBox, Picture As StdPicture)
    ' copy into the clipboard
    ' Copy the picture into the clipboard.
    Clipboard.Clear
    Clipboard.SetData Picture
    ' paste into the RichTextBox control
    SendMessage RTB.hWnd, WM_PASTE, 0, 0
End Sub


0
 

Author Comment

by:leachim
ID: 6160691
Thanks bobbit31
0
 

Author Comment

by:leachim
ID: 6176476
Thanks again bobbit31
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6181989
no problem, glad to help!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now