ol2002 sp-2 autosignature bug (item.body insert signature when it is touched)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top