Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TimCottee

Posted on 2001-06-06
4
Medium Priority
?
133 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

704 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