开发者

Manipulating Access VBA IDE methods from VBScript

开发者 https://www.devze.com 2023-01-22 20:00 出处:网络
I\'m trying to write a VBScript that will export and import the code modules from an Access MDB file to text files.开发者_Python百科

I'm trying to write a VBScript that will export and import the code modules from an Access MDB file to text files.开发者_Python百科

From within the app I can loop through the DAO Container & Documents and use the 'undocumented' Application.SaveAsText method, but can I do it externally?


Basically it is all COM, but the COM interface doesn't expose methods for opening files, using MDWs for security, etc, but minds greater than my own have found a solution to the problem at http://www.mvps.org/access/modules/mdl0036.htm. Once I've got a reference to the database, I can then use the techniques Remou and HansUp mention as normal.


It's all COM, so pretty much anything you can do from VBA in the IDE, you can do from a .vbscript file externally.

Set accessApplication = CreateObject("Access.Application")
' then do what you do from the IDE
0

精彩评论

暂无评论...
验证码 换一张
取 消