Thanks for this info. In de future I will try to do so. I my attempt to make it a small example I find my error. The command doc.InsertObject() was below the AIM in my script. For the AIM it is no problem but for the callbutton it is.