voorock Posted February 16, 2011 Posted February 16, 2011 Hello, I have a Word file containing lots of words that are written in normal or italic or bold, I seek to distinguish each of these formats and send a tag (number in parentheses) next to the word. Example: Normal (1) Italy (2) Fat (3) Thank you for your help.
Xenobiologist Posted February 16, 2011 Posted February 16, 2011 Hello,I have a Word file containing lots of words that are written in normal or italic or bold, I seek to distinguish each of these formats and send a tag (number in parentheses) next to the word.Example:Normal (1) Italy (2) Fat (3)Thank you for your help.HI,have a look at Vb (you can easily adapt that to Autoit)http://msdn.microsoft.com/en-us/library/aa172915%28v=office.11%29.aspxExampleThis example formats the sixth word in a new document as bold.Set newDoc = Documents.AddSet myRange = newDoc.ContentmyRange.InsertAfter "This is a test of bold."myRange.Words(6).Bold = True This example makes the entire selection bold if part of the selection is formatted as bold.If Selection.Type = wdSelectionNormal Then If Selection.Font.Bold = wdUndefined Then _ Selection.Font.Bold = TrueElse MsgBox "You need to select some text."End If This example toggles the bold format for the selected text.If Selection.Type = wdSelectionNormal Then Selection.Range.Bold = wdToggleMegaEnd If This example makes the first paragraph in the active document bold.Activedocument.Paragraphs(1).Range.Bold = True Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
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