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*****

Code:
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
'Lectures
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
MyShortcut.Save
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

This was first published in December 2000

Dig deeper on Lotus Notes Domino Interoperability

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close