Information générale
Catégorie:
Contrôles ActiveX en VFP
>Hi, All,
> When I using the AttachmentPosition property of Mapi like following, it always gave a error message about Invliad property value.
>My Code:
>==========================================================
>lnAttachPos=(LEN(Alltrim(THIS.cBodyText))-ALEN(THIS.aAttachmentFiles,1))-1 &&THIS.aAttachmentFiles is an array to store the attachment file list
>IF NOT EMPTY(THIS.aAttachmentFiles[1])
> Control.AttachmentPosition=lnAttachPos &&Error made here
> Control.AttachmentPathName=THIS.aAttachmentFiles[1]
>ENDIF
>==========================================================
>So I change the Code like this:
>==========================================================
>lnAttachPos=0
>IF NOT EMPTY(THIS.aAttachmentFiles[1])
> Control.AttachmentPosition=lnAttachPos &&Error made here
> Control.AttachmentPathName=THIS.aAttachmentFiles[1]
>ENDIF
>==========================================================
>Everything is OK! But I wonder why I could not give specify value to AttachmentPosition property of MAPI?
>Is there any friends can help me to work it out?
>Thanks a lot!
>
>BR
>
>Robin
Robin,
I'm not quite sure what you are trying to do here, but I would imagine that the attachment position is the position of the attachment in the attachments collection, and is a readonly property.
Mace
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement