Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I start the text import wizard automatically?
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I start the text import wizard automatically?
" I`d like to have a solution for all versions of MS Excel."
I can't thing of a response to this that would be appropriate. However, I just pieced this together; see if gets you started... '-- Sub DoItMyWay() Dim vResult As Variant On Error Resume Next vResult = Application.Dialogs(xlDialogImportTextFile).Show On Error GoTo 0 If vResult = False Then Exit Sub Else 'do it End If End Sub '-- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "pahan" wrote in message 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I start the text import wizard automatically?
Well, and what if putting such a macro in the AutoOpen macro and requiring my customers to enable macroses in Excel? Can I alter the Excel AutoOpen macro from my application setup program? "Tom Ogilvy" wrote: 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. 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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I start the text import wizard automatically?
An autoopen macro is specific and is contained in the workbook being opened.
Since your files are not xls files, then there is no way to have a macro in them. You would need to modify each users personal.xls file (or put in an additional equivalentfile) to instantiate application level events and install code that would kick off the text to columns code when it recognized that one of your text files had been opened. However, I am not sure personal.xls is loaded when you double click on a file - you would have to test it an see. It seems like what you really want is to modify Excel to recognize your file extension and process it as .CSV, but I don't believe there is a way to do that. . -- Regards, Tom Ogilvy "pahan" wrote in message ... Well, and what if putting such a macro in the AutoOpen macro and requiring my customers to enable macroses in Excel? Can I alter the Excel AutoOpen macro from my application setup program? "Tom Ogilvy" wrote: 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. 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text Import Wizard | Excel Discussion (Misc queries) | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
Text Import Wizard | Excel Discussion (Misc queries) | |||
Text Import Wizard | Setting up and Configuration of Excel | |||
Text Import Wizard | Excel Discussion (Misc queries) |