How to pass an object to another object with COMATEOBJECT

Just starting out? Need help? Post your questions and find answers here.
KIKI
Enthusiast
Enthusiast
Posts: 145
Joined: Thu Dec 28, 2006 11:49 am
Location: FRANCE

How to pass an object to another object with COMATEOBJECT

Post by KIKI »

Code: Select all

Objemail = COMate_CreateObject("CDO.Message") 
iConf = COMate_CreateObject("CDO.Configuration")
 
If objemail
  ;     Set .Configuration = iConf
 Objemail\SetPropertyRef("\Configuration =" + iConf ) 
i don't know how to do that
Objemail\SetPropertyRef("\Configuration =" + iConf )
iconf is antoher comate object
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Code: Select all

Objemail\SetPropertyRef("\Configuration = " + Str(iConf) + " as COMateObject") 
I may look like a mule, but I'm not a complete ass.
KIKI
Enthusiast
Enthusiast
Posts: 145
Joined: Thu Dec 28, 2006 11:49 am
Location: FRANCE

Post by KIKI »

srod wrote:

Code: Select all

Objemail\SetPropertyRef("\Configuration = " + Str(iConf) + " as COMateObject") 
I try these and if generat a comate error
in fact what i want to do is to affect to the cdo object the configuration of cdo

Here is the equivalent in visual basic

Code: Select all

 Set iMsg = CreateObject("CDO.Message")
   Set iConf = CreateObject("CDO.Configuration")
    
    With iMsg
      Set .Configuration = iConf
       .To = "destinataire@mail.fr"
      .Subject = "Le titre du message"
     .HTMLBody = "Ceci est un essai ..."
     .Fields("urn:schemas:mailheader:disposition-notification-to") = _
             "emetteur@mail.fr"
       .Fields("urn:schemas:mailheader:return-receipt-to") = _
              "emetteur@mail.fr"
       .Fields.Update
       .Send
   ; End With
Post Reply