Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

paste contents picture box in rtf report

Status
Not open for further replies.

rega566

Technical User
Jul 26, 2003
7
NL
Hi all,

I use an rtf file to print stock details and like to add the barcode which is in a picturebox. all of the data merges nicely, but i cannot seem to get the picture on the page. i managed to put the picture on the clipboard. when i open the printpage now it is literally under my richtmousebutton. but how do i get it in my report. below is the part of the printform where the data is merged.

thanks a lot!

john

Public Sub show_stockprint()

On Error GoTo check_err1

rpt1.FileName = App.Path & "/stockprint.rtf"




temp = rpt1.TextRTF
temp = Replace(temp, "::product no::", FRMSTOCKITEMS.TXTF(2).Text)
temp = Replace(temp, "::product.description::", FRMSTOCKITEMS.TXTF(2).Text)
temp = Replace(temp, "::Dutch::", FRMSTOCKITEMS.TXTF(11).Text)
temp = Replace(temp, "::papiamentu::", FRMSTOCKITEMS.TXTF(12).Text)
temp = Replace(temp, "::Category::", FRMSTOCKITEMS.TXTF(16).Text)
temp = Replace(temp, "::Units::", FRMSTOCKITEMS.TXTF(6).Text)
temp = Replace(temp, "::price::", FRMSTOCKITEMS.TXTF(9).Text)
rpt1.TextRTF = temp

rpt1.hwnd , WM_PASTE, 0, 0

Exit Sub
check_err1:
If Err.Number = 75 Then
MsgBox "File: " & App.Path & "/stockprint.rtf" & " is Open, Please Close It", vbCritical
MsgBox "File: " & App.Path & "/stockprint.rtf" & " is Open, Please Close It", vbCritical
End
Else
MsgBox "Some Error Occured: " & Err.Number & " " & Err.Description & vbCrLf & vbCrLf & "Program May Not Work Properly", vbCritical
MsgBox "Some Error Occured: " & Err.Number & " " & Err.Description & vbCrLf & vbCrLf & "Program May Not Work Properly", vbCritical
End
End If
End Sub
 
thanks dougp,

it might be a solution, however i still want to know how to copy the contents of the picturebox in case i like to add a picture of the product to the rtf report for example.

isn't there an easy way to paste the contents of the clipboard?

john
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top