![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
hello
I've VSTO Addin for Outlook 2007. I'm adding a dummy attachment in BeforeAttachment event & removing original attachment. But the attachment list still shows me original attachment along with dummy attachment. Besides this when I drag drop or insert attachment the cursor position changes. I also need to insert a link at current cursor position.so the cursor position should not change for proper link insertion. Below is the code I'm using - strMyTmpFilePath = IO.Path.Combine(strMyTmpFilePath, strMyTmpFileName) IO.File.AppendAllText(strMyTmpFilePath, "this is a dummy file") CurrentMailItem.Attachments.Add(strMyTmpFilePath) IO.File.Delete(strMyTmpFilePath) Cancel = True 'Code to add Link at cursor position Dim ObjSel As Object = CurrentInsp.WordEditor.Application.Selection With ObjSel Dim Rg As Object .MoveRight(Unit:=2, Count:=1) 'wdWord=2 Rg = .range .Hyperlinks.Add(Anchor:=Rg, Address:=strAttachmentURL _ , TextToDisplay:=strNewLink.ToString) .InsertAfter(" ") End With If Rg IsNot Nothing Then Marshal.FinalReleaseComObject(Rg) If ObjSel IsNot Nothing Then Marshal.FinalReleaseComObject(ObjSel) Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
removed attachment is still there but not accessible (OL 2003) | Wilfried | Outlook - General Queries | 0 | December 11th 08 04:46 PM |
Messages replies have an attachment of the original message | [email protected] | Outlook - General Queries | 2 | February 28th 07 04:34 PM |
Add-ins not being removed from toolbar | RoyalHale | Add-ins for Outlook | 1 | December 1st 06 03:04 PM |
email changes icon and attachment is removed | GK | Outlook - General Queries | 3 | February 23rd 06 03:40 AM |
Linebreaks getting removed??? | BDB | Outlook - General Queries | 4 | February 10th 06 10:39 AM |