F
Fil
If I drag and drop an email message on the Journal folder, a Journal Item is
created with an olEmbeddeditem attachment which is the link to the message I
just dragged and dropped on the Journal Folder. (Remark that the email
remains in the folder where it is).
Now I can select this attachment, copy it (through Ctrl+C) and paste it on
any excel worksheet or even in a windows folder.
When I paste it in excel, a shape is created.
When I paste it in a windows folder an *.shs file is created.
If I double click on any of the 2 above, the original outlook mail item that
I dragged and dropped on the Journal Folder is opened provided I didn't moved
the email in the meantime from its original folder to another one.
This is the only way I found to create links to my outlook messages. By the
way if you found any other way please tell me. I wouldn't be surprised that
it exist something 100 times more simple. Don't suggest me the url = folder
url & "~" & subject of the item because how do you open an item in a folder
where there are many items with the same subject?
I didn't find any way to execute the above programmatically.
I tried this from Excel with the appopriate references (Microsoft Outlook
11.0 Object Library)
------------------------------------------------------------------------------------
Public Sub createLinkToMessage()
If Outlook.ActiveExplorer.Selection.Count = 1 Then
Set myItem = Outlook.CreateItem(olJournalItem)
Call
myItem.Attachments.Add(Outlook.ActiveExplorer.Selection.Item(1),
olEmbeddeditem)
myItem.Save
myItem.Attachments.Item(1).SaveAsFile "c:\Scrap.shs"
myItem.Delete
Set myItem = Nothing
End If
End Sub
------------------------------------------------------------------------------------
but the resulting *.shs file is not the same than the one that I get when I
do paste after having copied the Journal Item attachment.
I tried to find a copy method to actually put this attchment into the
clipboard. That would have allowed be to simply paste it into my spreadsheet.
Hope you understood my concern.
And don't forget that my main purpose is to have a link to my email item in
my outlook. So if you have other methods please tell me.
Thank you
created with an olEmbeddeditem attachment which is the link to the message I
just dragged and dropped on the Journal Folder. (Remark that the email
remains in the folder where it is).
Now I can select this attachment, copy it (through Ctrl+C) and paste it on
any excel worksheet or even in a windows folder.
When I paste it in excel, a shape is created.
When I paste it in a windows folder an *.shs file is created.
If I double click on any of the 2 above, the original outlook mail item that
I dragged and dropped on the Journal Folder is opened provided I didn't moved
the email in the meantime from its original folder to another one.
This is the only way I found to create links to my outlook messages. By the
way if you found any other way please tell me. I wouldn't be surprised that
it exist something 100 times more simple. Don't suggest me the url = folder
url & "~" & subject of the item because how do you open an item in a folder
where there are many items with the same subject?
I didn't find any way to execute the above programmatically.
I tried this from Excel with the appopriate references (Microsoft Outlook
11.0 Object Library)
------------------------------------------------------------------------------------
Public Sub createLinkToMessage()
If Outlook.ActiveExplorer.Selection.Count = 1 Then
Set myItem = Outlook.CreateItem(olJournalItem)
Call
myItem.Attachments.Add(Outlook.ActiveExplorer.Selection.Item(1),
olEmbeddeditem)
myItem.Save
myItem.Attachments.Item(1).SaveAsFile "c:\Scrap.shs"
myItem.Delete
Set myItem = Nothing
End If
End Sub
------------------------------------------------------------------------------------
but the resulting *.shs file is not the same than the one that I get when I
do paste after having copied the Journal Item attachment.
I tried to find a copy method to actually put this attchment into the
clipboard. That would have allowed be to simply paste it into my spreadsheet.
Hope you understood my concern.
And don't forget that my main purpose is to have a link to my email item in
my outlook. So if you have other methods please tell me.
Thank you