Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Adding a new excel file type

Hi all,

I have a certain type of tab seperated file that I would like to load
in Excel.

I have a macro that will do the trick for me, but I'd like to make
things a bit easier on my users, by allowing them to open these files
transparently.

Ideally, I would like to have:

myfile.myextension

registered to be opened by microsoft excel on double click

And, here it comes, add the .myextension file type to the list of
default file types in excel, and hook up my macro when it wants to
open a file of this type.

Can this be done?

Thanks in advance,

Wim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Adding a new excel file type

Windows Explorer + Tools + Folder Options...

Then

File Types + New, type extension in the box, Click
Advanced, Select Microsoft Excel Application.

-----Original Message-----
Hi all,

I have a certain type of tab seperated file that I would

like to load
in Excel.

I have a macro that will do the trick for me, but I'd

like to make
things a bit easier on my users, by allowing them to open

these files
transparently.

Ideally, I would like to have:

myfile.myextension

registered to be opened by microsoft excel on double click

And, here it comes, add the .myextension file type to the

list of
default file types in excel, and hook up my macro when it

wants to
open a file of this type.

Can this be done?

Thanks in advance,

Wim
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Adding a new excel file type

Hi Mike,

thanks for your speedy answer, but it didn't seem to work
unfortunately.

I added the piece of code to the a hidden worbook I keep in XLStart
that also holds the parse macro, but it doesn't seem to jump in when
it should.

I've been reading some more on the groups and it seems it might be
possible to create a fileconverter, but there is hardly any
information available on the fileconverter API. This solution would be
the cleanest of course, this way no matter how you open a file, it
will be parsed correctly.

Another solution for me would be to 'override' text import wizard. The
default for each cell is 'general', and I would like it to be text.
Does anybody have any idea how this can be accomplished? Is it in the
registry somewhere?

Thanks,

Wim

"Mike" wrote in message ...
Creating the file association is simple. Open Windows
Explorer, right-click the file, select Open With, check
the "Always Open with..." check box, then choose Excel
from the list.

Having your macro parse this file after it opens is a bit
more tricky. It would be far easier to have people open
the file from within Excel, but it can be done. When you
double-click the file in Win Explorer, Excel loads, then
anything in your XLSTART folder (ie personal.xls file) is
loaded, then anything in the alternate startup folder is
loaded, then finally the file you clicked is loaded. In
order to get your macro to run, you may be able to make
use of the WindowDeactivate event of a book stored in the
alternate startup folder. Try this out for size, and
hopefully it will provide enough of a jumping point for
you.

Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)

For w = 1 To Application.Workbooks.Count
If Right(Application.Workbooks(w).Name, 3) = "tab" Then
MsgBox ("Run Parse Macro")
End If
Next

End Sub




-----Original Message-----
Hi all,

I have a certain type of tab seperated file that I would

like to load
in Excel.

I have a macro that will do the trick for me, but I'd

like to make
things a bit easier on my users, by allowing them to open

these files
transparently.

Ideally, I would like to have:

myfile.myextension

registered to be opened by microsoft excel on double click

And, here it comes, add the .myextension file type to the

list of
default file types in excel, and hook up my macro when it

wants to
open a file of this type.

Can this be done?

Thanks in advance,

Wim
.

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
Saved *.csv file gives SYLK file type warning upon Excel 2003 open Tom Excel Discussion (Misc queries) 5 March 19th 08 03:15 PM
How do you save an excel file to be read as IBM-type text file ? Dee Franklin Excel Worksheet Functions 2 October 10th 06 02:46 AM
Adding new 'Type' to Format->Number->Time->Type Chip Pearson Excel Discussion (Misc queries) 5 September 26th 05 08:45 PM
How do I type in on a file on excel crix411 Excel Discussion (Misc queries) 4 April 9th 05 04:29 PM
Adding a line Chart Type to a stacked-clustered Chart Type Debbie Charts and Charting in Excel 2 January 5th 05 11:25 PM


All times are GMT +1. The time now is 05:23 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"