open MS Excel

  • Thread starter Thread starter Melbourne
  • Start date Start date
M

Melbourne

I export data to MS Excel and would like to open the file when the export is
complete. Is there a function (code, macro, etc) in Access that will allow
me to open the file when the export is complete.
 
I export data to MS Excel and would like to open the file when the export is
complete. Is there a function (code, macro, etc) in Access that will allow
me to open the file when the export is complete.

Are you using the TransferSpreadsheet method to export the data?

DoCmd.TransferSpreadsheet ...... etc. ....
Application.FollowHyperlink "path to spreadsheet/spreadsheetname.xls"
 
The following code exports YourQueryName to YourExcelFileName.xls. The True
value makes sure Excel is opened right after the export.

DoCmd.OutputTo acQuery, "YourQueryName", "MicrosoftExcelBiff8(*.xls)",
"YourExcelFileName.xls", True, "", 0

Lars
 
Thansk Fredg, this worked perfectly.

fredg said:
Are you using the TransferSpreadsheet method to export the data?

DoCmd.TransferSpreadsheet ...... etc. ....
Application.FollowHyperlink "path to spreadsheet/spreadsheetname.xls"
 
Thanks your suggestion Lars.

Lars Brownie said:
The following code exports YourQueryName to YourExcelFileName.xls. The True
value makes sure Excel is opened right after the export.

DoCmd.OutputTo acQuery, "YourQueryName", "MicrosoftExcelBiff8(*.xls)",
"YourExcelFileName.xls", True, "", 0

Lars
 
?


feng said:
???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1. ??????????????

???? ??? ??? ??? ??????

2. ?????????????????

???? ???? ???? ???? ????

??? ??? ???

3???????????????

??? ??? ??? ??? ????

4. ????????????????(??)

?1-3? ?3-5? ?5-8? ?8-12? ?12?-15? ?15????

5. ?????????????????????

?8?? ?10?? ?15?? ?18?? ?20????

6. ????????????????

?3? ??? ??? ???? ???????

7??????????????????

?7-8? ? 4-5? ?2-3? ?1? ????

???????????????????,??!





???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1?. ????????????????????

????? ????? ????? ????? ????? ?????

???

2?. ???????????????????

??,??-_ ???,??:

3? ???????????????(??????????????)

????? ????? ????? ????? ????? ?????

????? ????? ?????

4? ???????????????????

????? ????? ?????? ??????? ???????

?????? ??????? ?????? ???????

5? ??????????????????

???? ???? ???? ????? ????? ?????

???

6??????????,?????????

????? ????? ????? ?????

7???????"???"(????)?????????????

??? ????

???????????????????,??!
 
ÖÓ´ú÷è said:
?


feng said:
???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1. ??????????????

???? ??? ??? ??? ??????

2. ?????????????????

???? ???? ???? ???? ????

??? ??? ???

3???????????????

??? ??? ??? ??? ????

4. ????????????????(??)

?1-3? ?3-5? ?5-8? ?8-12? ?12?-15? ?15????

5. ?????????????????????

?8?? ?10?? ?15?? ?18?? ?20????

6. ????????????????

?3? ??? ??? ???? ???????

7??????????????????

?7-8? ? 4-5? ?2-3? ?1? ????

???????????????????,??!





???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1?. ????????????????????

????? ????? ????? ????? ????? ?????

???

2?. ???????????????????

??,??-_ ???,??:

3? ???????????????(??????????????)

????? ????? ????? ????? ????? ?????

????? ????? ?????

4? ???????????????????

????? ????? ?????? ??????? ???????

?????? ??????? ?????? ???????

5? ??????????????????

???? ???? ???? ????? ????? ?????

???

6??????????,?????????

????? ????? ????? ?????

7???????"???"(????)?????????????

??? ????

???????????????????,??!
 
ÖÓ´ú÷è said:
?


feng said:
???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1. ??????????????

???? ??? ??? ??? ??????

2. ?????????????????

???? ???? ???? ???? ????

??? ??? ???

3???????????????

??? ??? ??? ??? ????

4. ????????????????(??)

?1-3? ?3-5? ?5-8? ?8-12? ?12?-15? ?15????

5. ?????????????????????

?8?? ?10?? ?15?? ?18?? ?20????

6. ????????????????

?3? ??? ??? ???? ???????

7??????????????????

?7-8? ? 4-5? ?2-3? ?1? ????

???????????????????,??!





???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1?. ????????????????????

????? ????? ????? ????? ????? ?????

???

2?. ???????????????????

??,??-_ ???,??:

3? ???????????????(??????????????)

????? ????? ????? ????? ????? ?????

????? ????? ?????

4? ???????????????????

????? ????? ?????? ??????? ???????

?????? ??????? ?????? ???????

5? ??????????????????

???? ???? ???? ????? ????? ?????

???

6??????????,?????????

????? ????? ????? ?????

7???????"???"(????)?????????????

??? ????

???????????????????,??!
 
ÖÓ´ú÷è said:
?


feng said:
???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1. ??????????????

???? ??? ??? ??? ??????

2. ?????????????????

???? ???? ???? ???? ????

??? ??? ???

3???????????????

??? ??? ??? ??? ????

4. ????????????????(??)

?1-3? ?3-5? ?5-8? ?8-12? ?12?-15? ?15????

5. ?????????????????????

?8?? ?10?? ?15?? ?18?? ?20????

6. ????????????????

?3? ??? ??? ???? ???????

7??????????????????

?7-8? ? 4-5? ?2-3? ?1? ????

???????????????????,??!





???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1?. ????????????????????

????? ????? ????? ????? ????? ?????

???

2?. ???????????????????

??,??-_ ???,??:

3? ???????????????(??????????????)

????? ????? ????? ????? ????? ?????

????? ????? ?????

4? ???????????????????

????? ????? ?????? ??????? ???????

?????? ??????? ?????? ???????

5? ??????????????????

???? ???? ???? ????? ????? ?????

???

6??????????,?????????

????? ????? ????? ?????

7???????"???"(????)?????????????

??? ????

???????????????????,??!
 
feng said:
???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1. ??????????????

???? ??? ??? ??? ??????

2. ?????????????????

???? ???? ???? ???? ????

??? ??? ???

3???????????????

??? ??? ??? ??? ????

4. ????????????????(??)

?1-3? ?3-5? ?5-8? ?8-12? ?12?-15? ?15????

5. ?????????????????????

?8?? ?10?? ?15?? ?18?? ?20????

6. ????????????????

?3? ??? ??? ???? ???????

7??????????????????

?7-8? ? 4-5? ?2-3? ?1? ????

???????????????????,??!





???????????

?????:

??!

????????????????,??????????????????????????????????????,???????????!

1?. ????????????????????

????? ????? ????? ????? ????? ?????

???

2?. ???????????????????

??,??-_ ???,??:

3? ???????????????(??????????????)

????? ????? ????? ????? ????? ?????

????? ????? ?????

4? ???????????????????

????? ????? ?????? ??????? ???????

?????? ??????? ?????? ???????

5? ??????????????????

???? ???? ???? ????? ????? ?????

???

6??????????,?????????

????? ????? ????? ?????

7???????"???"(????)?????????????

??? ????

???????????????????,??!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top