R
Rich Cheng
After upgrading outlook 2002 to sp2, signature is inserted
into the message whenever the item.body is called. The
codes below used to insert a signature correctly. Now it
insert 3 extra signature. I think this is a bug. Does
anyone have a fix. Hope Micrsoft wll fix it soon.
Thanks, Rich
dim bSignatureAdded
bSignatureAdded = false
Sub Item_PropertyChange(ByVal Name)
dim tempBody
if name = "To" and not bSignatureAdded then
tempBody=item.body
call GetSignature()
item.body=tempBody & vbCRLF & vbCRLF & item.body
bSignatureAdded = true
end if
End Sub
Sub GetSignature()
Dim oInspector, oCommandBars, oMenuBar, oInsert,
oSignatures, oSignature
Set oInspector = Item.GetInspector
Set oCommandBars = oInspector.CommandBars
Set oMenuBar = oCommandBars("Menu Bar")
Set oInsert = oMenuBar.Controls("Insert")
Set oSignatures = oInsert.Controls("Signature")
Set oSignature =oSignatures.Controls(1)
'This will put the default signature in the
signatures collection
oSignature.Execute
End Sub
into the message whenever the item.body is called. The
codes below used to insert a signature correctly. Now it
insert 3 extra signature. I think this is a bug. Does
anyone have a fix. Hope Micrsoft wll fix it soon.
Thanks, Rich
dim bSignatureAdded
bSignatureAdded = false
Sub Item_PropertyChange(ByVal Name)
dim tempBody
if name = "To" and not bSignatureAdded then
tempBody=item.body
call GetSignature()
item.body=tempBody & vbCRLF & vbCRLF & item.body
bSignatureAdded = true
end if
End Sub
Sub GetSignature()
Dim oInspector, oCommandBars, oMenuBar, oInsert,
oSignatures, oSignature
Set oInspector = Item.GetInspector
Set oCommandBars = oInspector.CommandBars
Set oMenuBar = oCommandBars("Menu Bar")
Set oInsert = oMenuBar.Controls("Insert")
Set oSignatures = oInsert.Controls("Signature")
Set oSignature =oSignatures.Controls(1)
'This will put the default signature in the
signatures collection
oSignature.Execute
End Sub