Sign in to follow this  
Followers 0
big_daddy

Word.au3 T2.0 (Help Needed!)

6 posts in this topic

It has been a long time coming, but the next release of Word.au3 is coming soon!

Several have asked for additional functionality, which I agree is much needed. I've been extremely busy for several months now and haven't had the time I'd like to spend on projects like this.

I am posting my rough draft ToDo list and ask that anyone interested please post your suggestions. The object model for MS Word is massive and I'm having troubles deciding what to and not to include. Also if anyone feels adventurous enough to study the object model and help my write functions and documentation I could use the help! Snippets of code that anyone would like to provide is welcome as well.

---

http://www.autoitscript.com/fileman/users/Big_Daddy/libraries/word/Microsoft_Word_Automation.html (Updated: 9/21/2007)

Microsoft Word Object Model

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

My initial thought on this is that you might want to consider some fundamental use cases, determine what functions are required to support those use cases and then prioritze the use cases to determine what new functionality would pay the biggest returns.

Use Case 1: Create and format a new document from scratch

Main success scenario:

1) open new word document

2) type text into that document, creating a new paragraph

3) format that newly created paragraph with an existing style

4) repeat steps 2) and 3) adding each new paragraph after the previous one until all desired text is entered and formatted

5) save and close document

Entensions:

3a) format text as a list

3b) add, populate and format a table

3c) add a graphic/shape

3d) add a hyperlink

Functions required:

_WordCreate()

_WordDocParagraphAdd()

_WordDocInsertText()

_WordDocFormatText()

_WordDocTableAdd()

etc.

Use Case 2: Restructure an existing document

Main success scenario:

1) open an existing document

2) find a specific range/selection in the document

3) insert text before or after that point

4) repeat 2) and 3) until complete

5) save and close document

Extensions:

3a) delete range/selection from the document

3b) cut range/selection and paste it in a new location in the document

3c) reformat range/selection with an existing style

Functions required:

_WordDocOpen()

-some sort of search function-

-object cut-

-object paste-

etc.

Do you find this useful? Shall we determine some more use cases?

Dale

Edit: BTW, I'm very happy to so you've found some time to revisit this. My needs are primarily taking information form other sources and applications and creating documents with it. Your efforts will be greatly appreciated.

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

My initial thought on this is that you might want to consider some fundamental use cases, determine what functions are required to support those use cases and then prioritze the use cases to determine what new functionality would pay the biggest returns.

I agree 100% with your thinking on this.

Do you find this useful? Shall we determine some more use cases?

I always find your feedback useful! I think those give me a good starting point, but if anyone has additional use cases I will gladly accept.

Edit: BTW, I'm very happy to so you've found some time to revisit this. My needs are primarily taking information form other sources and applications and creating documents with it. Your efforts will be greatly appreciated.

Thank you for your patience. I hate that I've had to push it off for this long.

Share this post


Link to post
Share on other sites

Hi, when do you think the version including _WordDocTableAdd() will be available. Regards,

It has been a long time coming, but the next release of Word.au3 is coming soon!

Several have asked for additional functionality, which I agree is much needed. I've been extremely busy for several months now and haven't had the time I'd like to spend on projects like this.

I am posting my rough draft ToDo list and ask that anyone interested please post your suggestions. The object model for MS Word is massive and I'm having troubles deciding what to and not to include. Also if anyone feels adventurous enough to study the object model and help my write functions and documentation I could use the help! Snippets of code that anyone would like to provide is welcome as well.

---

http://www.autoitscript.com/fileman/users/Big_Daddy/libraries/word/Microsoft_Word_Automation.html (Updated: 9/21/2007)

Microsoft Word Object Model

Share this post


Link to post
Share on other sites

How about search and replace within a text box?

William

Share this post


Link to post
Share on other sites

There's a neat little script here:

http://www.autoitscript.com/forum/index.php?showtopic=112825&st=0&p=790174&hl=word%20version&fromsearch=1&#entry790174

Written by Spiff59 and Storme

$objWord = ObjCreate("Word.Application")
If IsObj($objWord) Then
    $OfficeVersion = $objWord.Version
    $objWord.Quit
Else 
    $OfficeVersion = "N/A"
EndIf

Switch $OfficeVersion
    Case "7.0"
        $OfficeVersion = "97"
    Case "8.0"
        $OfficeVersion = "98"
    Case "9.0"
        $OfficeVersion = "2000"
    Case "10.0"
        $OfficeVersion = "2002"
    Case "11.0"
        $OfficeVersion = "2003"
    Case "12.0"
        $OfficeVersion = "2007"
    Case "14.0"
        $OfficeVersion = "2010"
    Case "N/A"
        $OfficeVersion = "Not Installed"
    Case Else
        $OfficeVersion = "Too Old!"
EndSwitch

MsgBox(0,"Office Version", "Your office Version is: " & $OfficeVersion)

that tells you which version of MS Word you have installed - might be worth adding to the UDF?

Perhaps enhanced by some correlation of which UDF functions work with which Word versions?

Regards,

William

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0