I have the following code to create emails:
#define olMailItem             0    // A MailItem object.
METHOD Activate() CLASS TMail
  local nCtr, cDest := ""
  local olApp := CreateObject( "Outlook.Application" )
  local olns, oMailItem
  oMailItem := olApp:CreateItem(olMailItem)
  oMailitem:Subject := ::cSubject
  oMailitem:Body := ::cNoteText
  for nCtr = 1 to len(::aRecipients)
    cDest += ::aRecipients[nCtr]+"; "
  next
  oMailitem:to := cDest
  cDest := ""
  for nCtr = 1 to len(::aCC)
    cDest += ::aCC[nCtr]+"; "
  next
  oMailitem:CC := cDest
  for nCtr = 1 to len(::aFiles)
    try
      oMailItem:Attachments:Add(::aFiles[nCtr])
    catch
      msginfo("Impossibile allegare il file "+trim(::aFiles[nCtr]))
    end
  next
  oMailItem:Display(.t.)       // got error here!!!
  return (Self)Now with FW20.02/Harbour 3.2 I get the following error:
Descrizione dell'errore: (DOS Error 1) WINOLE/1007 Parametro errato: DISPLAY
Stack Calls
===========
Called from TOLEAUTO:DISPLAY(0) ->
Called from TMAIL:ACTIVATE(151) -> .\wTMail.prg
Called from CLSSTADOC:GOMAIL(731) -> ..\prg\clsStado.prg
can somebody help to solve?
tank you
Roberto
Roberto Chiaiese
R&C Informatica S.n.c.
https://www.recinformatica.it
info@recinformatica.it
Harbour 3.2 - FW2512
