一个重要的问题。。。HELP!(50分)

  • 主题发起人 主题发起人 ahhliang
  • 开始时间 开始时间
A

ahhliang

Unregistered / Unconfirmed
GUEST, unregistred user!
众位大虾:
小弟有礼了。求问一个问题:
用SHELLEXE调用OUTLOOK怎么把附件加进去?
谢谢!
 
SHELLEXE只能打开一个文件,不能替你作其他的事。
比如你用SHELLEXE打开了一个word文档,你总不能连文档的内容都让他替你完成吧?[:)]
所以,SHELLEXE只能调用OUTLOOK,却不能把附件加进去,
即使别的方法或函数可以实现加附件的功能,但却不是SHELLEXE的目的。
 
strmsg:='mailto:'+EmailEdit.text+'?Subject='+'主题'+'&Body=';
if mainform.WordMemo.Lines.Count>1 then
begin
strmsg:=Strmsg+mainform.wordMemo.lines[0];
for i:=1 to mainform.wordmemo.lines.count-1 do
strmsg:=strMsg+'%0d%0a'+mainform.wordmemo.lines;
shellexecute(handle,'open',pchar(strMsg),'','',Sw_show);
end;

我用这段调用过,而且只要mainform.wordmemo的text不是很多就可以完完全全的
写到outlook里去。我想用附件应该也是可以的。但是不知道怎么用啦。

再问:shellexe跟shellexecute应该是一样的吧。
 
高手都到什么地方去了???
 
Mailto Protocol

--------------------------------------------------------------------------------

Opens a client's e-mail system.

Syntax

mailto:sAddress[sHeaders]

Possible Values

sAddress Required. One or more valid e-mail addresses separated by a semicolon. You must use Internet-safe characters. Use %20 for the space character.
sHeaders Optional. One or more name-value pairs. The first pair should be prefixed by a "?" and any additional pairs should be prefixed by a "&". The name can be one of the following strings. String Description
subject Optional. Text to appear in the subject line of the message.
body Optional. Text to appear in the body of the message.
CC Optional. Addresses to be included in the "cc" (carbon copy) section of the message.
BCC Optional. Addresses to be included in the "bcc" (blind carbon copy) section of the message.


Remarks

This is available as of Microsoft® Internet Explorer 3.0 or later. For more information on the mailto protocol, see RFC 2368.


Example

The following example shows a mailto URL that will prepare an e-mail message when typed into the Internet Explorer address bar.

mailto:mtscf@microsoft.com?subject=Feedback&body=The InetSDK Site Is Superlative"

The following example shows a link that will prepare an e-mail message.

<A HREF="mailto:mtscf@microsoft.com?
subject=Feedback&
body=The%20InetSDK%20Site%20Is%20Superlative">
Click here to send feedback to the InetSDK.</A>

The following example shows how to use an HTML form to create an e-mail message.

<FORM ACTION="mailto:mtscf@microsoft.com" METHOD=GET>
<INPUT NAME=subject TYPE=hidden VALUE="InetSDK%20User%20Feedback">
Enter comments about this site:<BR>
<TEXTAREA NAME=body COLS=40>
InetSDK: http://msdn.microsoft.com/workshop/
The InetSDK site is superlative!
</TEXTAREA>
<INPUT TYPE=submit VALUE="Send Feedback">
</FORM>

由此可知用以方法,没有可能。
 
楼上的朋友,你的e文搞得我忽忽突突的,幸亏我还是懂一点。
我用了ahm的控件,搞定了这个问题,但是或许你的e文还真的
有用,因为,你发一个有附件邮件给一个无法到的email地址
,它会告诉你那个附件的信息。但是我不知道怎么添加到里面去。
 
接受答案,谢谢
 
后退
顶部