Page 1 of 1

MS Access 2010

Posted: Sun Sep 23, 2012 11:47 am
by pluczka
Can PrimalScript 2012 be integrated with MS Office 2010, or at least used, to create/edit VBA scripts for Access in particular?

MS Access 2010

Posted: Sun Sep 23, 2012 1:28 pm
by jvierra
The PrimalScrip type for VB files will edit VBA but you will not have Office Intellisense.

The Office VBA editor is more approproaite.

PrimalScript is Excelent at building VBScript scripts that access Office products.

Here ios an example of using VBScript to adcess Excel:

sExcelFile = "f:testdest.xlsx"
Set xl = CreateObject("Excel.Application")
Set xlBk = xl.Workbooks.Open(sExcelFile)
MsgBox xlBk.Worksheets.Item(1).UsedRange.Rows.Count
xl.Quit

An example of listing riules from Outlook:

Set outlook = CreateObject("Outlook.Application")
Set colRules = outlook.Session.defaultstore.getrules()

For Each rule In colRules
For Each Action In rule.Actions
If Action.ActionType = 1 And Action.Enabled Then
WScript.Echo "Move To Folder: " & Action.Folder.Name
End If
Next
Next

We can run against MSAccess the same way. All of this can be built and debugged in PrimalScript. We cannot build design or debug forms, reports, HTML pages or any of the MSAccess objects. We can build and query tables from VBScript. We can use PS to type and manage VBA functiiona na Subs but not when in a project file.

VBA is not a scripting langauge it is a subset of VB and is a fully compiled langauge (VB compiled). VBA cannot even be managed in Visual Studio. Each instance of a VBA project is intimately tied to the Office product that it lives in.

MS Access 2010

Posted: Wed Sep 26, 2012 12:44 pm
by pluczka
Thanks for the insight. I've much to learn.