Jump to content

Search the Community

Showing results for tags 'wps office'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Greetings AutoIt community! I did a quick search and found nothing posted for working with WPS Office using AutoIt so far, though I did see a few requests for it over the years. In my testing and research I have found that WPS Office seems to be just a free, re-branded version of MSOffice. Underneath the makeup, the COM methods etc are all the same, even the CLSID’s! That being the case you can use the UDF’s by water (or others) meant for working with Microsoft Office’s products, such as the Word and Excel UDF’s included with AutoIt already, as well as the PowerPoint UDF by water, found here: https://www.autoitscript.com/forum/files/file/374-powerpoint-udf/ That being said, I have not exhaustively tested automating WPS using the MSWord COM methods. Though I have used many MSOffice COM methods, etc., for automating WPS without a problem, you are encouraged to do testing yourself and make sure it works. I do not have much experience with MSOffice and related products, and thus may not be able to help much with bugs, but I will try to help as time permits. The question will arise, why did I have to make a function, since these two Office programs are seemingly identical? Well, First, to open a new instance of WPS Office programs (Writer, Spreadsheets, Presentation), the Class names are different. (KWPS.Application vs Word.Application; KWPP.Application vs PowerPoint.Application; KET.Application vs Excel.Application). And secondly, when connecting (or attaching) to an existing instance of WPS, you can easily get a MSOffice application Object instead of a WPS Application Object, and vice versa, if you so happen to have both installed and running. Thus I added a check for the Registry path to contain the string “\kingsoft\” to ensure you retrieve the intended object. (If anyone has a better method, I would appreciate any hints. The CLSID’s are identical, as well as the class name when it is running (Word.Application; Excel.Application; PowerPoint.Application)) So far I haven’t come up with a better name, so I have called it simply “WPS Office Adapter” because it allows you to use MS Office UDF functions for WPS. Any suggestions for a name will also be appreciated. The functions I made are copies from those written by water in the respective MS Office UDFs, with modifications to work with WPS, and some personal preference. Once you retrieve the Object you need for the WPS application, simply use those Objects in the respective MS Office UDF function. One note for the _Excel_Close function, you will need to call ForceClose with True, or implement water’s internal __Excel_CloseOnQuit function as done in _Excel_Open, to allow the usual functionality of _Excel_Close to work. Also, in order for the examples of WPS Presentation to work, you will need to modify the Include path to point to the PowerPoint UDF, or place a copy into the main WPS UDF folder. Question or comments, or suggestions are welcome and appreciated. And also, if you wish to take this function and improve it or expand it, feel free, I’m not intending to go further than I have, with the exception of perhaps bug fixes as time permits. The Functions that replace existing MS Office functions are as follows: _WPS_Presentation_Attach -- Replaces --> _PPT_PresentationAttach _WPS_Presentation_Open -- Replaces --> _PPT_Open _WPS_Spreadsheets_BookAttach -- Replaces --> _Excel_BookAttach _WPS_Spreadsheets_BookList -- Replaces --> _Excel_BookList _WPS_Spreadsheets_Open -- Replaces --> _Excel_Open _WPS_Writer_Create -- Replaces --> _Word_Create Best regards, WPS Office Adapter.zip
×
×
  • Create New...