
open a message file *.msg in outlook 2000 using vba
Shell("c:\SomeFile.mgs", vbNormalFocus)
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
Quote:
> > Hello !
> > I want to open a msg file ( outlook ) that has an attachment in it
> > using vba.
> > I try to do it using the shell command with the \f switch in it
> > like:
> > Dim MyAppID As Variant
> > MyAppID = Shell("c:\Program Files\Microsoft Office 2000
> > office\outlook.exe /f buffer ,vbNormalFocus)
> > where buffer is the name of the file but it open the file only if it
> > does not include an attachment otherwith it return an outlook error
> > message that the switch is not ok .
> > I try to use other way
> > Dim oOL As Outlook.Application
> > Set oOL = CreateObject("Outlook.Application")
> > oOL.CreateItemFromTemplate(buffer)
> > MyAppID = Shell(oOL & " /f ", vbNormalFocus)
> > but it only open the outlook and not the file.
> > Help will be wellcome.
> > With thanks ahead
> > Doron
> Hello !
> Thanks for the quick response, but what a mean in my question is to open
> Outlook and showing the message and all attachment like if you are doing it
by
> pressing with your mouse on the message .
> with thanks ahead Doron