I am trying to process my document in a database that we deploy to users as part of an integration piece.Essentially I need to get the email address; this may have been entered by the user after the document was created, or more likely added as part of the integration with our CRM system.
It occours to me that the user could be using the To, CC or BCC field for the email address…
So I wrote some code like this:
Dim item As NotesItem
Dim E3MTo As NotesItem
Dim E3MCC As NotesItem
Dim E3MBcc As NotesItem
Set E3MTo = doc.GetFirstItem( “SendTo” )
Set E3MCC = doc.GetFirstItem( “CopyTo” )
Set E3MBcc = doc.GetFirstItem(“BlindCopyTo”)
If(E3MTo Is Not Nothing & E3MCC Is Not Nothing & E3MBcc Is Not Nothing) Then
Set Item = E3MTo And E3MCC And E3MBcc
If(GNDTo<>“” & GNDCC <>“” ) Then
Set Item = GNDTo & GNDCC
If(GNDTo<>“” & GNDBcc <>“” ) Then
Set Item = GNDTo & GNDBcc
If(GNDTo=“” & GNDCC <>“” & GNDBcc <>“” ) Then
Set Item = GNDCC & GNDBcc
If(GNDTo<>“” & GNDCC = “” & GNDBcc = “”) Then
Set item = doc.GetFirstItem(GNDTo)
If(GNDCC<>“” & GNDTo = “” & GNDBcc = “” ) Then
Set item = doc.GetFirstItem(GNDCC)
If(GNDBcc<>“” & GNDCC = “” & GNDTo = “”) Then
Set item = doc.GetFirstItem(GNDBcc)
End If
End If
End If
End If
End If
End If
End If
But it won’t compile, gives the error Type mismatch on GNDTo
On this line (it says): Set item = doc.GetFirstItem(GNDTo)
Although, most of the code is in Red so I don’t think any of its working…any ideas on how to get in one Item all three GetFirstItems for To, CC and BCC ?