MS Access 2010

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
pluczka
Posts: 5
Last visit: Fri Aug 06, 2021 2:36 pm

MS Access 2010

Post by pluczka »

Can PrimalScript 2012 be integrated with MS Office 2010, or at least used, to create/edit VBA scripts for Access in particular?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

MS Access 2010

Post 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.
User avatar
pluczka
Posts: 5
Last visit: Fri Aug 06, 2021 2:36 pm

MS Access 2010

Post by pluczka »

Thanks for the insight. I've much to learn.
This topic is 11 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked