# Re: 用VB寄有附件的信

Posted by 小猫 on April 12, 1999 at 11:33:00:

In Reply to: Re: 用VB寄有附件的信 posted by 飞云 on April 08, 1999 at 14:18:12:

: 那是因为你定了 mapimess1.compose 之后
: 又作了别的，以至于 mapimess1.msgindex 不等于 -1

: 又，你的信件内容字数比附件数少，所以当掉
: 试试这一个
: sss% = Len(MAPIMess.MsgNoteText)
: If sss% < AttCon% + 3 Then
: MAPIMess.MsgNoteText = Str$(sss%) + String$(AttCon%, " ")
: End If
: '附件
: If Val(mRS!att) Then
: Set mRA = mDB.OpenRecordset("att", dbOpenDynaset)
: 'I = 0
: Do Until mRA.EOF
:
: If mRA!Id = Number$ Then
: MAPIMess.AttachmentIndex = MAPIMess.AttachmentCount
: MAPIMess.AttachmentName = mRA!attname
: MAPIMess.AttachmentPathName = mRA!attpath 'DigAtt.filename
: MAPIMess.AttachmentPosition = MAPIMess.AttachmentIndex
: MAPIMess.AttachmentType = 0 'vbAttachTypeData
: 'I = I + 1
: mRA.Delete
: End If 'mrs!id
: mRA.MoveNext
: Loop
: mRA.Close
: End If
: MAPIMess.Send

请问一下你的AttCon, mRA, mRS是啥呢?

Follow Ups: