Skip to content

Consider test that compare result document structure #9

Description

@kildom

Maybe it will be possible to write a script that opens docx file in Word and using COM, converts it to some file (e.g. JSON)

Some example code in VB (run using cscript):

Dim objWord, objDoc
Set objWord = CreateObject("Word.Application")

' Open the document (change the path to match your file)
Set objDoc = objWord.Documents.Open("C:\path\to\your\document.docm")

' Make Word visible (optional, can be set to False for silent execution)
objWord.Visible = True

' Run the macro (replace "YourMacroName" with the actual macro name)
objWord.Run "YourMacroName"

' Save and close the document
objDoc.Close True ' True saves changes, False discards changes
objWord.Quit

' Clean up
Set objDoc = Nothing
Set objWord = Nothing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions