Am Tue, 9 May 2006 16:43:56 +0200 schrieb Nader:
Nader, when the error raises it highlights the line of code for you. Please
set the cursor into the method it´s subject to ('Add' in this case) right
click and select "Quick Info". It´ll popup a tooltip that shows you all the
method´s arguments. That ones in brackets are optional, the other ones are
not, i.e. they must be specified.
If you now click with the mouse into the argument you have specified
("Body") it highlights its name in the tooltip. So you can simply see what
arguments are missed.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.vbOffice.net --
Hello,
thanks for the help. I've created an add-in with vb6 and I've tried to
send
an email with outlook. When I send the email I get an error : "argument
not
optional".
the code :
Private Sub objOLApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
On Error GoTo errMsgBox
Dim p As Outlook.UserProperty
Set p = Item.UserProperties("Body")
If p Is Nothing Then
Set p = Item.UserProperties.Add("Body")
End If
p.Value = "huhu"
errMsgBox:
MsgBox Err.Description
End Sub
thanks in advance.
"Michael Bauer" a écrit dans le message de news:
...
Am Tue, 2 May 2006 18:50:47 +0200 schrieb Nader:
That´s VBA, not VBScript for custom forms. Yes, you could also create
Add-Ins and use that code.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
Is this the vbscript code that should go into the form ? Or is it
possible
to create an addin that will caputre the send event and the text to the
body
of the message I'm sending.
thanks.
"Michael Bauer" a écrit dans le message de news:
...
Am Mon, 1 May 2006 13:23:17 +0200 schrieb Nader:
Sample:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
On Error Resume Next
Dim p as Outlook.UserProperty
Set p=Item.UserProperties("property_name")
If p Is Nothing Then
Set p=Item.UserProperties.Add("property_name")
Endif
p.value="huhu"
End Sub
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
Thanks. So what would be the best way then to do what I want ?
thanks.
"Michael Bauer" a écrit dans le message de news:
...
Am Fri, 28 Apr 2006 11:00:35 +0200 schrieb Nader:
I wouldn´t modify the form for that, but in the ItemSend event add a
field
to the UserProperties collection.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
Hello,
I'd like to modifiy the default e-mail form (outlook 2002) so
whenever
I
send an e-mail I can add some text automatically without user being
able
to
see it.
thanks in advance.