I use Vfp 9.0 and Outlook Express (with a Mapi object)
I want to copy text from a Word document and paste it in the mail body. My word document is stored in a General field. Here is the code:
IF thisform.logsession=.t. && Check if the user was able to login
SELECT Mytable
keyboard '{Ctrl+C}{Ctrl+W}' plain clear
modi general ('Mytable.MyWordDoc') && The Word document is in the Clipboard now
thisform.OleMMess.sessionID=thisform.OleMSess.sessionID
thisform.OleMMess.compose()
thisform.OleMMess.MsgNoteText=_CLIPTEXT && I want to place the Word doc in the message body
thisform.OleMMess.msgindex=-1
thisform.OleMMess.msgsubject="the subject"
merror=0
ON ERROR do errormsg with merror
thisform.OleMMess.send(.t.)
ON ERROR
thisform.OleMSess.signoff
ENDIF
The problem is that it doesn't paste the text in the message body. Any idea?
Thanks in advance
I want to copy text from a Word document and paste it in the mail body. My word document is stored in a General field. Here is the code:
IF thisform.logsession=.t. && Check if the user was able to login
SELECT Mytable
keyboard '{Ctrl+C}{Ctrl+W}' plain clear
modi general ('Mytable.MyWordDoc') && The Word document is in the Clipboard now
thisform.OleMMess.sessionID=thisform.OleMSess.sessionID
thisform.OleMMess.compose()
thisform.OleMMess.MsgNoteText=_CLIPTEXT && I want to place the Word doc in the message body
thisform.OleMMess.msgindex=-1
thisform.OleMMess.msgsubject="the subject"
merror=0
ON ERROR do errormsg with merror
thisform.OleMMess.send(.t.)
ON ERROR
thisform.OleMSess.signoff
ENDIF
The problem is that it doesn't paste the text in the message body. Any idea?
Thanks in advance