open MS Excel

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.
 
F

fredg

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"
 
L

Lars Brownie

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
 
M

Melbourne

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"
 
M

Melbourne

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???????"???"(????)?????????????

??? ????

???????????????????,??!
 
X

xingxing

ÖÓ´ú÷è 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???????"???"(????)?????????????

??? ????

???????????????????,??!
 
X

xingxing

ÖÓ´ú÷è 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???????"???"(????)?????????????

??? ????

???????????????????,??!
 
X

xingxing

ÖÓ´ú÷è 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???????"???"(????)?????????????

??? ????

???????????????????,??!
 
G

Gerrit en Rikie van Kleef

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???????"???"(????)?????????????

??? ????

???????????????????,??!
 
Top