Page 18 of 39

Posted: Wed Nov 19, 2008 1:08 pm
by srod
Well then I suspect a mix up with the parameters or paramater types.

Use COMate_GetLastErrorDescription() to get an idea what the problem might be. If that doesn't help then equip yourself with some kind of OLE viewer so that you can drill down into the object's methods to look at the parameters etc.

Posted: Wed Nov 19, 2008 1:13 pm
by Kiffi

Code: Select all

KCC_Code = ReplaceString(KCC_Code, "AS COMate object", "AS COMateObject")
;-)

Greetings ... Kiffi

Posted: Wed Nov 19, 2008 1:41 pm
by srod
:lol:

Whoops...

Posted: Wed Nov 19, 2008 1:43 pm
by Kwai chang caine
YEEEEEEEESSSSSS !!!!!!
KIFFI as win
:D

It's funny how you have explain to me :lol:

Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks,Thanks :D

I have forgotten Thanks,Thanks,Thanks,Thanks :lol:
I love you all :D

That's works

Well now again this important part not works.
It's for sending a document join

Code: Select all

 ; documents joint 1 
  Define bodyAtt.COMateObject 
  Define bodypart.COMateObject ; Added by KCC
 
  If Len(Attachment1) > 0  
   If FileSize(Attachment1) > 0 
    bodyAtt = bodypart\GetObjectProperty(Str(#EMBED_ATTACHMENT) + ", '', '" + Attachment1 + "', '" + Attachment1 + "'") 
   EndIf 
  EndIf 
  

Posted: Wed Nov 19, 2008 1:48 pm
by srod
bodypart has not been initialised!!! (As I explained before!)

Posted: Wed Nov 19, 2008 1:50 pm
by Kwai chang caine
Yes yes my good SROD.
Keep cool :lol:
I understand quickly, but you must explain me a long time :oops:

This is this sentence that i do translate, right ???

Code: Select all

Set bodypart = beDoc.CREATERICHTEXTITEM("Body") 

Posted: Wed Nov 19, 2008 2:00 pm
by srod
Well, what is beDoc - where is that defined in your PB code? I see it in the VB code...

Code: Select all

bodypart = beDoc\Invoke("CREATERICHTEXTITEM('Body')") 

Posted: Wed Nov 19, 2008 2:14 pm
by Kwai chang caine
Thanks SROD
I have not again at the top, because me i have write this :lol:

Code: Select all

bodypart\Invoke(Str(MailDoc) + " AS COMateObject \ CREATERICHTEXTITEM('Body'))
I have again an error invalid memory with this code

Code: Select all

; documents joint 1 
  Define bodyAtt.COMateObject 
  Define bodypart.COMateObject ; Added by KCC
  bodypart = MailDoc\Invoke("CREATERICHTEXTITEM('Body')") 
 
  If Len(Attachment1) > 0  
   If FileSize(Attachment1) > 0 
    bodyAtt = bodypart\GetObjectProperty(Str(#EMBED_ATTACHMENT) + ", '', '" + Attachment1 + "', '" + Attachment1 + "'") 
   EndIf 
  EndIf 

Posted: Wed Nov 19, 2008 2:21 pm
by srod
Sorry my mind is elsewhere at the moment.

Code: Select all

bodypart = beDoc\GetObjectProperty("CREATERICHTEXTITEM('Body')") 
or

Code: Select all

bodypart = MailDoc\GetObjectProperty("CREATERICHTEXTITEM('Body')") 
Whichever one you need.

Posted: Wed Nov 19, 2008 2:26 pm
by Kwai chang caine
Yes yes i have correct that alone, it's a miracle no ????? :lol:
It is the fault at Kiffi, he changed the names of variables, I'm lost, ugly kiffi :lol: :lol: :lol:

In my mean, the problem is to translate this line

Code: Select all

Set bodyAtt = bodypart.EmbedObject(EMBED_ATTACHMENT, "", Attach1, Dir(Attach1)) 
You have translated to this

Code: Select all

bodyAtt = bodypart\GetObjectProperty(Str(#EMBED_ATTACHMENT) + ", '', '" + Attachment1 + "', '" + Attachment1 + "'") 
But there are an memory error on this line :cry:

Posted: Wed Nov 19, 2008 2:30 pm
by Kwai chang caine
Perhaps the world ".EmbedObject" missing no ????

Posted: Wed Nov 19, 2008 2:36 pm
by srod

Code: Select all

bodyAtt = bodypart\GetObjectProperty("EmbedObject(" + Str(#EMBED_ATTACHMENT) + ", '', '" + Attachment1 + "', '" + Attachment1 + "')") 

Posted: Wed Nov 19, 2008 2:42 pm
by Kwai chang caine
I did not say a big stupidity :D
It's really the ".EmbedObject" missing
I'm not a big donkey, i just a little donkey :lol:

I have always an error of memory this your last line :cry:

Posted: Wed Nov 19, 2008 2:44 pm
by srod
I have no idea - check the value of bodypart.

Posted: Wed Nov 19, 2008 2:53 pm
by Kwai chang caine
If i ask VB debugger what is the value of bodypart.name, he said to me "Body" and for bodyAtt.name, he said to me the name of the join piece :shock: