Custom functions allow developers to create new functions that can be used in applications such as Excel, Word, and others by defining them in WS as part of an add-in. This article will guide you through creating a custom function in WS.
This section focuses on user-created functions that can be utilized with the WSOffice DLL, enabling access to ActiveX objects and system calls. You will learn how to create custom functions using two key concepts: ActiveX Objects and WS Office functions.
ActiveX Objects
ActiveX Objects enable interaction with Microsoft COM components, allowing applications to access system resources, automate tasks, and integrate with other software.
WS Office Functions
WS Office functions call methods from Microsoft Office applications to automate tasks and enhance functionality within those programs.
We will explore these custom functions in the following sections:
- ActiveX Objects
Enable interaction with Microsoft COM components to automate tasks and access system resources. - Sample Concept
Automate tasks and enhance functionality, like selecting files for bulk data transfer to SAP using WS Office. - replaceText
Allows searching and replacing specific strings within a text variable. - selectDirectory
Enables users to choose files (Excel, Word, PDF) from a folder for bulk data transfer to SAP using WS Office. - sort
Allows users to sort values in an input field column. - startApplication
Launches a specified application or program automatically, using the startApplication custom function with WS.