|   |  
> 「宛先(TO/CC/BCC)に自ドメイン以外を含む場合」 
> というのをマクロで記述するにはどうしたらいいでしょうか? 
 
 精度が多少悪くてもいいようでしたら、strstrで探す手があります。 
 
    loaddll "tkinfo.dll"; 
    $to = dllfuncstr("CurrentHeaderUnited", "To") + "," + dllfuncstr("Curren 
tHeaderUnited", "Cc"); 
    $to = dllfuncstr("ToLower", $to); 
    if( strstr( $to, "@mydomain.co.jp" ) >= 0 ) { 
        //自ドメイン含む 
        message "自ドメイン含む"; 
    } else { 
        message "自ドメイン含まず"; 
    } 
 
 みたいな処理になります。ちゃんとやるなら、メールアドレスを1つ1つ取り出し 
てループさせないとダメかと思います。以下のようになります。 
 
    loaddll "tkinfo.dll"; 
    $to = dllfuncstr("CurrentHeaderUnited", "To") + "," + dllfuncstr("Curren 
tHeaderUnited", "Cc"); 
    $to = dllfuncstr("ToLower", $to); 
    #i = 0; 
    #count = dllfunc("CountEmailList", $to); 
    #found = 0; 
    while( #i < #count ) { 
        $email = dllfuncstr("GetEmailList", $to, #i); 
        $email = dllfuncstr("SetEmailOnly", $email); 
        $email = dllfuncstr("ToLower", $email); 
        #x = strstr( $email, "@" ); 
        if( #x >= 0 ) { 
            $domain = midstr( $email, #x + 1 ); 
            if( $domain == "mydomain.co.jp" ) { 
                #found = 1; 
                break; 
            } 
        } 
        #i = #i + 1; 
    } 
    if( #found != 0 ) { 
        //自ドメイン含む 
        message "自ドメイン含む"; 
    } else { 
        message "自ドメイン含まず"; 
    } 
 
 こんな感じでどうでしょうか。 
 
			 | 
		  
	 |