KickStarter15 Posted April 13, 2017 Share Posted April 13, 2017 (edited) Hi Experts, I just need your help guys in converting this VBA code to Autoit. Not really good in doing the conversion. This is to find superscript letters or numbers in Word document. Selection.Find.ClearFormatting With Selection.Find.Font .Superscript = True .Subscript = False End With Selection.Find.Execute With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Application.Browser.Next Having hard time nowadays with my projects. Grateful and Appreciated if anyone could help me with this. Thanks in advance, Experts. KS15 Edited April 13, 2017 by KickStarter15 Edited: Removed Item 2 already fixed by Subz. Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare. Link to comment Share on other sites More sharing options...
Quesney Posted April 13, 2017 Share Posted April 13, 2017 Not sure if the info in this post will help you or not, but @water assisted someone here with some ideas. “Courage is being scared to death, but saddling up anyway” – John Wayne Link to comment Share on other sites More sharing options...
Juvigy Posted April 13, 2017 Share Posted April 13, 2017 Here you go: #include <Word.au3> $oWord = _Word_Create() $oDoc = _Word_DocAttach($oWord, "SC preparation.docx", "Filename") $oWord.Selection.Find.ClearFormatting With $oWord.Selection.Find.Font .Superscript = True .Subscript = False EndWith $oWord.Selection.Find.Execute With $oWord.Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = $wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False EndWith $oWord.Application.Browser.Next Link to comment Share on other sites More sharing options...
KickStarter15 Posted April 14, 2017 Author Share Posted April 14, 2017 @Quesney, Thanks, man. Appreciated, got the idea. @Juvigy, I don't know that simple is how to convert such VB I posted. Thanks a lot, I'm new in Word UDF so might ask more in the future. Thank you Guys, for the time. KS15 Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now