Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Macro to save an xml (Excel2007) file into an Excel97 format

 
   Mac (Home) -> Outlook RSS
Next:  Sent messages not appearing in the Sent Items Fol..  
Author Message
Filip De Decker

External


Since: Apr 28, 2008
Posts: 1



(Msg. 1) Posted: Mon Apr 28, 2008 6:47 am
Post subject: Macro to save an xml (Excel2007) file into an Excel97 format
Archived from groups: microsoft>public>outlook>mac (more info?)

Hi, I created this macro (below) in order to let it run automatically over
number of .xml files that have to be saved into another place(directory) but
as Excel97 files.
(in fact I have a DOS script that selects all .xml files in a certain
directory. Each selected file should be opened automatically and saved
automatically into a subdirectory called xls, saving the file as an Excel97
document (as you see below, I use the parameter FileFormat:=xlExcel8 _ to
instruct VB to do so) ).
I you save the code into a file called PERSONAL.xls and put it into the
directory ../XLSTART , excel will execute the macro right away when started.

MY PROBLEM : this macro worked with Excel2003 but soon we are going to
upgrade to Excel2007! The macro stops when it tries to save the file (right
after the MessageBox) and Excel crashes.

All help = welcome.
THnks.
Filip.

---


Option Explicit

'The following function returns the filename without the extension from the
file's full path:
Function FileNameNoExt(strPath As String) As String
Dim strTemp As String
strTemp = Mid$(strPath, InStrRev(strPath, "\") + 1)
FileNameNoExt = Left$(strTemp, InStrRev(strTemp, ".") - 1)
End Function

'the following function will get the path only (i.e. the folder) from the
file's ful path:
Function FilePath(strPath As String) As String
FilePath = Left$(strPath, InStrRev(strPath, "\"))
End Function

Sub auto_open()
Application.Quit
End Sub

Sub auto_close()

Dim NewFName As String
Dim FullPathAs String

NewFName = "xls\" & FileNameNoExt(ActiveWorkbook.FullName)
FullPath= FilePath(ActiveWorkbook.FullName)

MsgBox " NewFName: " & NewFName
MsgBox " VolledigPad: " & VolledigPad

ActiveWorkbook.SaveAs Filename:=FullPath+ "xls\" + NewFName,
FileFormat:=xlExcel8 _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Outlook 2001 personal folder can't open. - I want to open an Outlook 2001 created personal folder which showed me "Errors have been detected in the personal folders file", I found the folder size is about 2Gbyte. so could somebody give me a hand to solve this problem... thanks Jack

Problem Exporting Mail from OE into Thunderbird - I am unable to import OE 5.0.6 messages into Thunderbird. The Thunderbird import option/wizard does not show OE [running OS X Tiger, with OE either closed or open in Classic (OS 9.2.2) mode]. How can I make OE appear visible to Thunderbird? Are ther...

help :( MAC 9.2.2, OUTLOOK 2001 - No exchange server ?!?!? - Hi, I just downloaded the Outlook 2001 and it's all ready to go on my son's iMac. We have OS 9.2.2 fully updated on it. plus I found the updates for all software running on this machine including office 2001 products. Now, I have a PC so I know this....

Mac clients unable to log in with DC at 2003 SP1 and Excha.. - Greetings, We have an issue that has arisen with our Mac users after we upgraded to Windows 2003 SP1. We are running exchange 5.5 on a windows 200 server and all has been well until the DC's were upgraded to Server 2003 SP1. Now all Mac clients..

Outlook 2001,Exchange 2003, and Tiger - I have an Exchange 2003 server that serves both PCs and MACs. Our newest Tiger (10.4.2) machine has Outlook 2001 installed. Outlook attaches to the mail store, but won't display either the user's contacts list or the public GAL. The user can receive..
       Mac (Home) -> Outlook All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact