Tip

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.