Remove numbers from brackets
Microsoft Office Forums » Word VBA
by cd254
6M ago
Hi, I have c. 500 letters in a single document, many of them customized. Every letter includes a bracketed % number in this format (3.3%) although the number is variable. I now need to remove the (x.x%) from each letter and delete the spaces. I've tried using find and replace / wildcards - I can use this to replace the brackets, but it wont detect the numbers in between. I am wondering if a VBA macro could do this for me instead? Any help greatly appreciated ..read more
Visit website
GetCaretPos can't get the correct value
Microsoft Office Forums » Word VBA
by wak
11M ago
When i call GetCaretPos in MS Word Addin, It always return's a same value. When i Enable IME,it can return the correct value. Some one can tell me why ..read more
Visit website
VBA-Table Word 2019 - Move a selected text, from a cell to the adjacent cell to its right, by pressing the ENTER key
Microsoft Office Forums » Word VBA
by cdl
11M ago
Hello, I have a table with 4 rows over 3 columns. This VBA code should move a selected text, from one cell to the adjacent cell to its right, after selecting the ENTER key. I tried it, but it doesn't work. Am I wrong or missing something? Sub MoveTextToRight() Dim oTable As Table Dim oCell as cell Dim oSelection as a selection Set oSelection = Application.Selection If oSelection.Information(wdWithInTable) = True then Set oTable = oSelection.Tables(1) Set oCell =... Read more ..read more
Visit website
Save new document as MHT format
Microsoft Office Forums » Word VBA
by Stacey Bailey
11M ago
Hi. I have a macro that I've used in the past to slice up Mailmerged documents into separate files. In the past, I've exported the files as xml using the text format and an xml extension. I'm trying to repurpose that macro to generate .mht files (single file web pages). I can generate the files as .htm using: ActiveDocument.SaveAs FileName:=Title & ".htm", FileFormat:=wdFormatHTML There doesn't seem to be a wdformat for .htm nor does there seem to be a file converter available. Has... Read more ..read more
Visit website
Setting Table Cell Margins/Padding to "Same as the Whole Table".
Microsoft Office Forums » Word VBA
by Fred Holmes
11M ago
Word 2003 In a Table, using a macro, I am trying to set the cell margins/padding back to the "default" value. This operation is accomplised manually by: Tables => Table Properties => Cell => Options => Cell Margins => checkbox: Same as the whole table. (which sets "cell padding") I can do the inverse, customize the cell padding to explicit custom values for the cell with, e.g., the following working vba code: With Selection.Cells(1) .TopPadding = InchesToPoints(0.05) .BottomPadding =... Read more ..read more
Visit website
Word macro that can call cells out of Excel for a find and replace
Microsoft Office Forums » Word VBA
by Jcoch1775
11M ago
Hi, I am trying to create a macro that can open a file, go to excel and select cell I2, find the values in I2 inside the file, then go back to excel and replace the found values with the values in cell J2. This then needs to be repeated (cells I3, J3, I4, etc.) until the end of the spreadsheet. This is what I currently have. It is made for finding and replacing a value based on the input box. I want it to go to the cells instead for the value: Sub FindReplaceMultiFile()... Read more ..read more
Visit website
Key assignment and wdKey constants on non-US keyboards
Microsoft Office Forums » Word VBA
by Ogier
11M ago
Hello out there! I've got 2½ questions: FIRST QUESTION: In some documents I use Greek letters and special symbols a lot. I have therefore used the (I beleive quite standard) code shown below to insert UNIcode characters with simple keyboard commands, like Alt-G to give a gamma and Shift-Alt-G to produce a capital gamma: Public Sub AssignAltKeyToMacro(MacroName As String, Key As WdKey) KeyBindings.Add KeyCategory:=wdKeyCategoryMacro, _ Command:=MacroName, KeyCode:=BuildKeyCode(wdKeyAlt... Read more ..read more
Visit website
VBA office 365 on windows 10
Microsoft Office Forums » Word VBA
by shubha
11M ago
I have installed win 10 OS with office 365. Macros which are running correctly in win 7 and win 8.1 are not running. Before the execution of for loop, commands next to for loop executes. incase message box is given after for loop, msgbox apears before completion of for loop Please help how to rectify the issue ..read more
Visit website
Find and replace macro for Special ^p - MS Word
Microsoft Office Forums » Word VBA
by MHSL
11M ago
I am looking macro for Find and Replace specials replacements: .^p to .^p^p !^p to !^p^p "^p to "^p^p )^p to )^p^p :^p to :^p^p ^p_ to ^p (_ is space) _^p to ^p (_ is space) ^p^p^p to ^p^p ^m to ^p^p ^m to ^p^p ^b to ^p^p etc..... Can anyone send some link for this type of macro. Rgds S ..read more
Visit website
OLE Word spelling
Microsoft Office Forums » Word VBA
by Markus
11M ago
I use OLE to call Word to check spelling in a text box. For years this has worked well. Word opens, highlights misspelled words with suggestions, user clicks on Change where needed, and Word quickly closes with the changes written into the text box. Now this works only 2 in 10 times. Instead, Word opens, highlights misspellings with suggestions, user clicks on Change and the changes are made on screen. But after all changes and instead of OLE closing and returning to the text box, Word... Read more ..read more
Visit website

Follow Microsoft Office Forums » Word VBA on FeedSpot

Continue with Google
Continue with Apple
OR