View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Can I start the text import wizard automatically?

Only way I can think of it so turn on the macro recorder and open it
manually. When done, turn off the macro recorder and look at the recorded
code. It should be the OpenText method.

Now you can generalize the code to allow a variable file name.

If you want to be able to double click on your file and this macro kick in,
I doubt you can do that.

--
Regards,
Tom Ogilvy


"pahan" wrote:

Hi everybody!
I have a file format which is actually CSV but has my own extension. I`ve
manually registered it in the windows registry to be opened by MS Excel. If I
open these files from Windows Explorer (not from Excel "Open file" dialog) I
need to start Text import wizard manually to properly format data from them.
Is there a way to launch Text import wizard automatically and with desired
settings in it? If yes, I`d like to have a solution for all versions of MS
Excel.