keybd_event versus SendKeys to open Access database with macros disabled
Hi all
I am wanting to programmatically open an Access database with macros disabled (equivalent to opening with Shift key pressed). I have seen code for both keybd_event and SendKeys and am wondering what is the difference. I have heard that SendKeys is a method of 'last resort'. Can anyone enlighten me? Thanks in advance Paul Martin Melbourne, Australia |
keybd_event versus SendKeys to open Access database with macros disabled
Most would recommend automation if you actually need to open the Access
application. to do your work. If you just need to work with the data, you may not need to open access. Sendkeys simulates typing at the Keyboard. Naturally, how those keystrokes are interpreted would depend on the environment at the time. I am not sure on the keybd_event, but would suspect it has something to do with using the Windows API to stuff keystrokes in the keyboard buffer. The effect would be the same. http://support.microsoft.com/?id=167223 OFF97: Microsoft Office 97 Automation Help File Available (Q167223) http://support.microsoft.com/?id=260410 OFF2000: Microsoft Office 2000 Automation Help File Available (Q260410) accessing the data directly: DAO/ADO http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "Paul Martin" wrote in message oups.com... Hi all I am wanting to programmatically open an Access database with macros disabled (equivalent to opening with Shift key pressed). I have seen code for both keybd_event and SendKeys and am wondering what is the difference. I have heard that SendKeys is a method of 'last resort'. Can anyone enlighten me? Thanks in advance Paul Martin Melbourne, Australia |
keybd_event versus SendKeys to open Access database with macros disabled
Tom
Thanks for the reply. I may write my app in Excel or possibly VB6. I'm not interested in the data at all. I need to analyse different components of the .MDB file like system tables, macros, queries, etc for drive letter paths, use of DSNs and use of non-standard Reference Libraries (DLLs). If I write the app in Excel, it will write details to a worksheet. If in VB6, I'll probably write to a text file and open in Excel. I am just looking at the best way to open an Access database with macros disabled, equivalent to pressing the Shift key. Paul Tom Ogilvy wrote: Most would recommend automation if you actually need to open the Access application. to do your work. If you just need to work with the data, you may not need to open access. Sendkeys simulates typing at the Keyboard. Naturally, how those keystrokes are interpreted would depend on the environment at the time. I am not sure on the keybd_event, but would suspect it has something to do with using the Windows API to stuff keystrokes in the keyboard buffer. The effect would be the same. http://support.microsoft.com/?id=167223 OFF97: Microsoft Office 97 Automation Help File Available (Q167223) http://support.microsoft.com/?id=260410 OFF2000: Microsoft Office 2000 Automation Help File Available (Q260410) accessing the data directly: DAO/ADO http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "Paul Martin" wrote in message oups.com... Hi all I am wanting to programmatically open an Access database with macros disabled (equivalent to opening with Shift key pressed). I have seen code for both keybd_event and SendKeys and am wondering what is the difference. I have heard that SendKeys is a method of 'last resort'. Can anyone enlighten me? Thanks in advance Paul Martin Melbourne, Australia |
keybd_event versus SendKeys to open Access database with macros disabled
You might want to post in an access newgroup if you want to know about
Access properties and methods. Automation would probably be the way to go. -- Regards, Tom Ogilvy "Paul Martin" wrote in message ups.com... Tom Thanks for the reply. I may write my app in Excel or possibly VB6. I'm not interested in the data at all. I need to analyse different components of the .MDB file like system tables, macros, queries, etc for drive letter paths, use of DSNs and use of non-standard Reference Libraries (DLLs). If I write the app in Excel, it will write details to a worksheet. If in VB6, I'll probably write to a text file and open in Excel. I am just looking at the best way to open an Access database with macros disabled, equivalent to pressing the Shift key. Paul Tom Ogilvy wrote: Most would recommend automation if you actually need to open the Access application. to do your work. If you just need to work with the data, you may not need to open access. Sendkeys simulates typing at the Keyboard. Naturally, how those keystrokes are interpreted would depend on the environment at the time. I am not sure on the keybd_event, but would suspect it has something to do with using the Windows API to stuff keystrokes in the keyboard buffer. The effect would be the same. http://support.microsoft.com/?id=167223 OFF97: Microsoft Office 97 Automation Help File Available (Q167223) http://support.microsoft.com/?id=260410 OFF2000: Microsoft Office 2000 Automation Help File Available (Q260410) accessing the data directly: DAO/ADO http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "Paul Martin" wrote in message oups.com... Hi all I am wanting to programmatically open an Access database with macros disabled (equivalent to opening with Shift key pressed). I have seen code for both keybd_event and SendKeys and am wondering what is the difference. I have heard that SendKeys is a method of 'last resort'. Can anyone enlighten me? Thanks in advance Paul Martin Melbourne, Australia |
All times are GMT +1. The time now is 03:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com