جدا کردن 3 رقم 3 رقم اعداد در ورد2013 word

Hi, It's easy to separate 3 digits of the 3 digits in Office in Excel, but it's a little different in the word.


No matter what your office is.


Perform the following steps step-by-step.




1. Copy the code below to the beginning of the work


Sub ScratchMacro()

'A basic Word macro coded by Greg Maxey

Dim oRng As Word.Range

 Set oRng = ActiveDocument.Range

 With oRng.Find

  .Text = "[0-9]{3,}"

  .MatchWildcards = True

  While .Execute

   oRng.Select

   If MsgBox("Do you want to format this instance", vbQuestion + vbYesNo, "FORMAT") = vbYes Then

    oRng = Format(oRng, "#,##0")

   End If

   oRng.Collapse wdCollapseEnd

  Wend

 End With

End Sub



2. Open Word application. Press alt + F11.

3. From the menu, select the module option, create a new module, paste the text I mentioned above PASTE here.

4. To execute, press F5.

5. If a debug error, scroll to your Windows control panel, from the language and country setting, ADDITIONAL SETTING will mark the separator mark from the simulcan to anything that is customary like a comma.

Again I say:


Note: If you encounter the following error after running the macro:


Run-time error '5560':


The Find What text contains a Pattern Match expression which is not valid.


Perform step 5. # To solve the problem, it's preferable to change the character separator to ",".


Press the F5 button again.






6. Answer the questions asking Word to give a positive response to the module and add it.




7. Go back to the Word file and apply the module to the numbers.



Farhad Ranji


FARHAD RANJI

/ 0 نظر / 84 بازدید