View Single Post
  #4  
Old August 19th 09, 02:54 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Original Attachment not removed

I don't know about forcing a refresh as well as not changing the cursor
position. However, that's not really an issue, since you can always get the
cursor position first before it changes. That should help.

See if faking out Outlook helps, something like item.Body = item.Body. But I
think you're going to have to save. I usually use a flag in those cases,
first I check the Saved property and then I flag my save if needed, then I
handle the Write() event on the item and if I didn't fire that event by
saving it's the user who did it (or auto-save). Then I can work out if I
need to delete the item from Drafts if necessary.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"sd" wrote in message
...
Thanks Ken
I saved item after new attachment addition & also after removing the
old one.But no success.Attachment list not refreshed.
Also I don't want to save item (if the user cancels send then I will
have to remove this item from drafts).I reassigned the body
format,that refreshes the attachment list.But in plain text mode link
is not recognized (it is displayed as plain text) & cursor position
again set to starting of message body .
Is there any way so the link gets recognized & also cursor position
doesn't change? If I don't add new attachment ,just remove the old
one & add the link then there is no problem link is recognized &
cursor position also not changed.


Ads