Repost: How do I create a file shortcut in an *existing* JournalItem 
Author Message
 Repost: How do I create a file shortcut in an *existing* JournalItem

I originally posted the following last Friday afternoon.  I don't know if
there has been no response because of posting late on Friday, being unclear
with my question or whether no one is sure of the answer.

Marty

Original message:

I am trying to create a VBA macro for adding a shortcut to a file to an
existing JournalItem.  I thought that the following macro code would do the
trick:

Sub MyAddLink()
    Dim fileToAttach As Variant
    Dim myItem As JournalItem

    Set myItem = ActiveInspector.CurrentItem
    fileToAttach = Excel.Application.GetOpenFilename()
    If fileToAttach <> False Then
        Call myItem.Attachments.Add(fileToAttach, olByReference, 1,
"Shortcut to it")
    End If

End Sub

However, everytime I run the macro I get the following error at the
Attachments.Add step:

Run-time error '-2081292279 (83f20009)':
File link attachments are not supported my Microsoft Outlook Internet
support

I am running OL2000 (IMO), on Windows Pro 2000.  I know I can drag a file
from Windows Explorer into an OL Journal folder and create this type of
shortcut, but I can't seem to do it programatically.  Anyone have an idea
what I am doing wrong?

TIA,

Marty



Sun, 18 Jan 2004 01:35:16 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How do I create a file shortcut in an *existing* JournalItem

2. REPOST: Creating Shortcut within Win 9

3. Retrieving TargetPath from existing shortcut files using VBScript

4. Reading Target path from *existing* shortcut files.

5. Creating word Macro to copy text and create new files from existing one

6. Creating Movie Files from Existing Movie Files

7. Create a new .wav file from an existing .wav file based on the date

8. VB4 and creating CAB files (repost)

9. Repost: Graphics and Word, can it be done?

10. Repost: Sendmessage - what am I doing wrong?

11. Creating a Shortcut File

12. Can I create a file shortcut from code??

 

 
Powered by phpBB® Forum Software