Manage Learn to apply best practices and optimize your operations.

Detach from Outlook a File

Open the mail Outlook, detach the Word File and copy in directory (MEP2000) and in body of this doc, by button or action
****Sorry for my english, I'm translet in French my sentences*****

Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.Currentdocument
Dim object As NotesEmbeddedObject
Dim doc As NotesDocument
Dim rtitem As Variant
Set doc = uidoc.document
Directory2 = "MEP" & Cstr(Year( Now() ))
'Cr�er object Outlook
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.ActiveInspector.CurrentItem
'Copy l'attachement on MEP2000 directory
Set myAttachments = myItem.Attachments
myAttachments.Item(1).SaveAsFile Directory2 & "" & FileName & ".doc"
'Close object Outlook
Set myOlApp = Nothing
Set recMessage = Nothing
'Create a shortcut object
Set WSHShell = CreateObject( "WScript.Shell" )
Set MyShortcut = WSHShell.CreateShortcut( Directory2 & "" & FileName&
".lnk" )
MyShortcut.TargetPath = Directory2 & "" & FileName & ".doc"
MyShortcut.WorkingDirectory = Directory2
MyShortcut.WindowStyle = 4
Set WSHShell= Nothing
Set MyShortcut = Nothing
'Importation + attachement de FileName
Set rtitem = New NotesRichTextItem( doc, "Body" )
If Not( Directory2 & "" & FileName & ".lnk" = "" ) Then
Set object = rtitem.EmbedObject( EMBED_ATTACHMENT, "", Directory2 & ""&
FileName & ".lnk" )
End If

Dig Deeper on Lotus Notes Domino Interoperability

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...