Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 52
Default changing a Word doc to Excel

I have a macro that allows a user to pick Word document
file from a list(as a text file), formats the columns and
adds a header then saves the file as an Excel document.
The file opens in one drive and saves in another.

The problem I have is that the file still has the .doc in
the filename and saves as a .doc file not Excel (even if
Microsoft office Excel Workbook is used as in

filesavename = Application.GetSaveAsFilename( _
fileFilter:="microsoft office excel workbook Files
(*.xls), *.xls")
How do I take out the .doc from the filename?
This is done in Excel 2003.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default changing a Word doc to Excel

Hi Bob,

Bob wrote:
I have a macro that allows a user to pick Word document
file from a list(as a text file), formats the columns and
adds a header then saves the file as an Excel document.
The file opens in one drive and saves in another.

The problem I have is that the file still has the .doc in
the filename and saves as a .doc file not Excel (even if
Microsoft office Excel Workbook is used as in

filesavename = Application.GetSaveAsFilename( _
fileFilter:="microsoft office excel workbook Files
(*.xls), *.xls")
How do I take out the .doc from the filename?
This is done in Excel 2003.


replace the string with nothing:

FileSaveName = Application.GetSaveAsFilename( _
InitialFileName:=Replace(ActiveWorkbook.Name, ".doc", ""), _
fileFilter:="microsoft office excel workbook Files(*.xls), *.xls")

--
Regards

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing a word document into an excel spreadsheet aganchingco Excel Discussion (Misc queries) 7 October 26th 06 11:39 PM
how do i merge numbers from excel to word without them changing Tazz Excel Discussion (Misc queries) 2 May 16th 06 12:49 PM
Excel should have case changing menu items like Word. Bill Friedman Excel Worksheet Functions 1 February 1st 06 03:58 AM
Changing word case in Excel doc Brent Excel Discussion (Misc queries) 2 July 8th 05 09:03 PM
How to convert word doc to excel w/o changing format to add formu. cyndimac Excel Discussion (Misc queries) 0 March 3rd 05 05:21 PM


All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"