Alex & Access

January 28, 2015

Getting localized NT AUTHORITY domain name

Filed under: VBA — access @ 10:13 am

If you are dealing with built-in system accounts, like NT AUTHORITY\SYSTEM, this code can help you on localized Windows versions, where NT AUTHORITY domain is also translated, for example to NT-AUTORITÄT in German version. You can get localized name using it SID "S-1-5-18":

?GetObject("winmgmts:root\cimv2").Get("Win32_SID.SID=’S-1-5-18’").ReferencedDomainName

You have to use this function, when you select system object using Object selection dialog as well.

January 27, 2015

Object selection dialog

Filed under: VBA — access @ 9:51 am

Object selection dialog (or Directory service Object Picker) can be useful when you need to change user right on file system or SQL server. I never used it before and it took me some time to find the right code, which works in Access and VB – Object picker with dispcallfunc.

image

Using the Windows 2000/XP Object Selection Dialog article helps to understand parameters of dialog, and Active-Directory-Object-Picker is a .Net version of dialog.

January 5, 2015

Automate any browser with Selenium VBA

Filed under: VBA — access @ 8:23 am

You can easy use Internet Explorer to do web tasks from your code, like screen-scraping or filling forms. But other browsers do not have COM interface, so Selenium VBA let you do such tasks with other browsers as well. Basically it provides a COM interface to the popular Selenium web testing tool. What you can do with Selenium VBA:

  • Automate repetitive web browser tasks.
  • Quickly fill a web form multiple times with data from your table.
  • Extract data from a web page into custom table.
  • Take screenshots of a Web site and save them in a PDF file.
  • Use the selenium automation framework .

Create a free website or blog at WordPress.com.