In your form, or function simply do this to copy the text to the clipboard of Windows.
Code:
Clipboard.SetText ActiveForm.rtfText.SelRTF
Pasting is pretty much the opposite!
Code:
ActiveForm.rtfText.SelRTF = Clipboard.GetText
Want to print what's in your programs box?
Code:
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ActiveForm.rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
ActiveForm.rtfText.SelPrint .hDC
End If
End With