Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / July 2004

Tip: Looking for answers? Try searching our database.

this routine saves a msg as txt, can it be modified to save as an xls file?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fitful_thought - 30 Jul 2004 07:14 GMT
Sub SaveAsPlainText()
Set myolapp = CreateObject("Outlook.Application")
Set myItem = myolapp.ActiveInspector
 If Not TypeName(myItem) = "Nothing" Then
     Set objItem = myItem.CurrentItem
        objItem.SaveAs "C:\message.txt", olTXT
  Else
     MsgBox "There is no current active Inspector."
 End If

End Sub
Dmitry Streblechenko \(MVP\) - 30 Jul 2004 07:25 GMT
No, you will need to create an instance of the Excel.Application object and
drive it in your code to create a worksheet, populate its cells and save it
to a file.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> Sub SaveAsPlainText()
>  Set myolapp = CreateObject("Outlook.Application")
[quoted text clipped - 7 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.