Results 1 to 2 of 2

Thread: Hopefully a simple question.... (resolved)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Location
    UK
    Posts
    83

    Smile Hopefully a simple question.... (resolved)

    All i really want to know is, is it possible to insert images into a rich text box with VB, if so how?

    and if not, do you know why word can do it for rtf's and we cant :P

    I know for sure that my program will open images in a rtf file.. but don't know how to insert them...
    Last edited by DanC2k2; Nov 14th, 2002 at 03:05 PM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Try something along these lines

    VB Code:
    1. Private Sub Form_Load()
    2. Dim lpobj As OLEObject
    3. Dim szfilename As String
    4. szfilename = App.Path & "\ttt444.bmp" ' put some valid file name here
    5. Set lpobj = RichTextBox1.OLEObjects.Add(, , szfilename)
    6. lpobj.DisplayType = rtfDisplayContent
    7. End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width