Jump to content

Search the Community

Showing results for tags '_WordDocAddLink'.

  • 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. Hi all, I've been trying to get Mass Spammer's fine example of _WordDocAddLink to hyperlink all occurances of [2011] EWHC 2244 (COP) in the target document - this works fine when I know there are 2 occurances but is there some object variable I need to use in order to do this? I've looked at word macros and found : Selection.Find.Execute Replace:=wdReplaceAll but Replace:=wdReplaceAll doesn't work or isn't recognised as a replacement for Execute in my script below - is it something to do with Range? There must be a way to specify all occurances. #include <Word.au3> #AutoIt3Wrapper_UseX64 = n $cite = "[2011] EWHC 2244 (COP)" ;"C:\Users\Joe\Documents\AutoIt_code\getter\processing" ;"C:\Documents and Settings\joe.ury\My Documents\AutoIt_code\getter\processing\test.doc" $oWordApp = _WordAttach ("C:\Users\Joe\Documents\AutoIt_code\getter\processing\test.rtf") $oDoc = _WordDocGetCollection ($oWordApp, 0) ;MsgBox(0, "Document Count", $oDoc) $oSelect = $oDoc.Application.Selection $oFind = $oSelect.Find For $x = 1 to 2 With $oFind .Text = $cite .Forward = True .Wrap = 1 .Execute EndWith _WordDocAddLink ($oDoc, $oSelect.Range, "[url="http://www..bongo.org/ew/cases/EWHC/COP/2011/2244.html"]http://www.bongo.org/ew/cases/EWHC/COP/2011/2244.html[/url]", "", "BAILII Link" & @CRLF, $cite) ;EndIf $oLinks = _WordDocLinkGetCollection ($oDoc) ;If _WordDocFindReplace($oDoc, $cite) = 1 Then ExitLoop Next ConsoleWrite("Link Count " & @extended & @LF)
×
×
  • Create New...