怎么样启动OUTLOOK?
我用RUN('c:\program file\office\outlook.exe xxx')启动OUTLOOK,他总说我的参数有问提,可是要是去了参数就只能把OUTLOOK运行起来,不能创建一个新的邮件,并把XXX添入到地址栏里面
不知道那位大侠赐教一下!
要在PB中启动OUtlook,并且有邮件,必须用PB的mail,看看下面的例子:
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
// Create a mail session
mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF
// Populate the mailMessage structure
mMsg.Subject = mle_subject.Text
mMsg.NoteText = 'Luncheon at 12:15'
mMsg.Recipient[1].name = 'Smith, John'
mMsg.Recipient[2].name = 'Shaw, Sue'
// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent')
RETURN
END IF
mSes.mailLogoff()
DESTROY mSes
这样以后再启动outlook,就可以有收发信的人名,还可以添加附件!