Home All Groups Group Topic Archive Search About

FAx sent over faxmailtransport of server is not recognized as fax

Author
2 Oct 2007 12:41 PM
MIchael
Hello
I want a fax thats sent over the faxmailtransport service of the server to be recognized as a fax and not as an email.
therefore I tried to check the recipient for the word fax with the following simple check

Dim SuchText, SuchZeichen, Pos1
SuchText = itmMail.Recipients    ' Zu durchsuchende Zeichenfolge.
SuchZeichen = "Fax"    ' Nach "FAx" suchen.
Pos1 = InStr(1, SuchText, SuchZeichen, 1)

   With myJournal
         .Categories = "E-mail Message"
         If Pos1 > 0 Then
            .Type = "Fax"
            .Categories = "Fax"
            Else
            .Type = "E-mail Message"
            .Categories = "E-mail Message"
         End If
        .Subject = itmMail.Subject
        .ContactNames = itmMail.SenderName
        .Save
      End With
But it stops at line 2 with error "runtime error-2147024809 (80070057)

Has anyone a idea why
or is there a better way to check for fax?
thank you very much for help!
Michael

Author
2 Oct 2007 2:20 PM
Sue Mosher [MVP-Outlook]
How are you instantiating itmMail?

itmMail.Recipients returns a Recipients collection, not a string value.

To find out if a fax recipient is involved, check the value of Recipient.AddressEntry.Type for each Recipient in the Recipients collection.

--
Sue Mosher, Outlook MVP
   Author of Microsoft Outlook 2007 Programming:
     Jumpstart for Power Users and Administrators
    http://www.outlookcode.com/article.aspx?id=54


Show quote
"MIchael" <Heirich***@web.de> wrote in message news:e4s02GPBIHA.3916@TK2MSFTNGP02.phx.gbl...
> Hello
> I want a fax thats sent over the faxmailtransport service of the server to be recognized as a fax and not as an email.
> therefore I tried to check the recipient for the word fax with the following simple check
>
> Dim SuchText, SuchZeichen, Pos1
> SuchText = itmMail.Recipients    ' Zu durchsuchende Zeichenfolge.
> SuchZeichen = "Fax"    ' Nach "FAx" suchen.
> Pos1 = InStr(1, SuchText, SuchZeichen, 1)
>
>   With myJournal
>         .Categories = "E-mail Message"
>         If Pos1 > 0 Then
>            .Type = "Fax"
>            .Categories = "Fax"
>            Else
>            .Type = "E-mail Message"
>            .Categories = "E-mail Message"
>         End If
>        .Subject = itmMail.Subject
>        .ContactNames = itmMail.SenderName
>        .Save
>      End With
> But it stops at line 2 with error "runtime error-2147024809 (80070057)
>
> Has anyone a idea why
> or is there a better way to check for fax?
> thank you very much for help!
> Michael
>
>
>

AddThis Social Bookmark Button