Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2014, 12:40 PM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default Convert a number into Hindi

Convert a number into Hindi without affecting the other numbers the same file
File attachment explains my question
Attached Files
File Type: docx post.docx (16.0 KB, 12 views)
Reply With Quote
  #2  
Old 01-09-2014, 02:54 PM
macropod's Avatar
macropod macropod is offline Convert a number into Hindi Windows 7 32bit Convert a number into Hindi Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can use code like the following to convert a selected number to Hindi script.
Code:
Sub ArabicToHindi()
Application.ScreenUpdating = False
Dim fRng As Range, StrTmp As String, i As Long
Set fRng = Selection.Range
With Selection.Range
  .Collapse wdCollapseStart
  With .Find
    .ClearFormatting
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchWildcards = True
    .Text = "<[,.0-9]{1,}"
    .Replacement.Text = ""
    .Execute
  End With
  Do While .Find.Found
    MsgBox fRng.Start & vbTab & fRng.End _
    & vbCr & .Start & vbTab & .End
    If .InRange(fRng) = False Then Exit Do
    With .Duplicate
      If .Characters.Last = "." Then .End = .End - 1
      If .Characters.Last = "," Then .End = .End - 1
      ' If the numbers are input right-to-left, use:
      StrTmp = Reverse(.Text)
      ' If the numbers are input left-to-right, use:
      'StrTmp = .Text
      For i = 0 To 9
        StrTmp = Replace(StrTmp, Chr(48 + i), ChrW(1632 + i))
      Next i
      .Text = StrTmp
      'apply Hindi proofing language
      .LanguageID = wdHindi
    End With
    .Collapse (wdCollapseEnd)
    .Find.Execute
  Loop
End With
fRng.Select
Application.ScreenUpdating = False
End Sub
 
Function Reverse(StrTmp As String) As String
  If (Len(StrTmp) > 1) Then
    Reverse = Reverse(Mid$(StrTmp, 2)) + Left$(StrTmp, 1)
  Else
    Reverse = StrTmp
  End If
End Function
The code includes a function for reversing the number too, if that's what you need. Comments in the code show what to change.

Since your numbers are in the page header, you'll have to select them there before running the macro. I also note that your '71002' is a field code. The macro will convert that to plain text.

For macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-10-2014, 05:33 AM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

I do not know how to use the code
Reply With Quote
  #4  
Old 01-10-2014, 05:41 AM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

i try to use the code , but no change
Attached Files
File Type: docx new post.docx (15.1 KB, 8 views)
Reply With Quote
  #5  
Old 01-10-2014, 08:28 AM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

After Use Code
Is of the nature of the user field
It is the reverse of the file numbering
Attached Files
File Type: docx 11.docx (13.8 KB, 8 views)
Reply With Quote
  #6  
Old 01-10-2014, 02:50 PM
macropod's Avatar
macropod macropod is offline Convert a number into Hindi Windows 7 32bit Convert a number into Hindi Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Kalegola View Post
I do not know how to use the code
Quote:
Originally Posted by Kalegola View Post
After Use Code
Is of the nature of the user field
It is the reverse of the file numbering
Please pay attention to what you've already been told in post #2
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 01-10-2014, 04:52 PM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

thank you very much
and i'm Sorry for the misunderstanding because i'm not good in English
but i do my file
Attached Files
File Type: docx 111.docx (14.7 KB, 10 views)
Reply With Quote
  #8  
Old 01-10-2014, 05:05 PM
macropod's Avatar
macropod macropod is offline Convert a number into Hindi Windows 7 32bit Convert a number into Hindi Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Did you select what you want to change, then run the macro? I cannot see any indication of what you have done.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 01-10-2014, 05:15 PM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

look to my attached file in last post 111.docx
the number 7005 in Hindi
Reply With Quote
  #10  
Old 01-10-2014, 05:25 PM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

look also to these files
Attached Files
File Type: docx post.docx (16.2 KB, 11 views)
File Type: zip post.zip (38.4 KB, 9 views)
Reply With Quote
  #11  
Old 01-10-2014, 05:57 PM
macropod's Avatar
macropod macropod is offline Convert a number into Hindi Windows 7 32bit Convert a number into Hindi Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Kalegola View Post
look to my attached file in last post 111.docx
the number 7005 in Hindi
I did that - and there is no evidence in it that you have followed the instructions.

Please don't keep attaching files that don't show that you've done as the instructions say, especially when you haven't even answered the questions I have asked.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 01-10-2014, 06:24 PM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

i do what u told me
i select what i want to change, then run the macro
Attached Images
File Type: png 2.PNG (21.1 KB, 11 views)
File Type: png Capture.PNG (19.1 KB, 11 views)
Reply With Quote
  #13  
Old 01-10-2014, 06:40 PM
macropod's Avatar
macropod macropod is offline Convert a number into Hindi Windows 7 32bit Convert a number into Hindi Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Well, that looks to me like the code is working - 1 / 7 / 71002 gets changed to ١ / ٧ / ٧١٠٠٢. So what do you mean when you say it's not working?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #14  
Old 01-10-2014, 10:16 PM
Kalegola Kalegola is offline Convert a number into Hindi Windows 7 64bit Convert a number into Hindi Office 2007
Novice
Convert a number into Hindi
 
Join Date: Jan 2014
Posts: 9
Kalegola is on a distinguished road
Default

I mean when i say it's not working
that is the first time to use code and i dont know how to use it
but i search on net and i do it
thank you too much
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert a number into Hindi Cannot Convert Text Cell to number format to be able to sort the data jyfuller Excel 10 06-19-2013 05:31 PM
Convert a number into Hindi convert to number gsrikanth Excel 1 01-09-2012 01:01 AM
Convert .ost to .pst phoy Outlook 1 12-03-2011 07:07 PM
Convert a number into Hindi Mailing: how to make the "page number" in Word is the same as "row number" in excel w Jamal NUMAN Word 1 09-03-2011 11:37 AM
Convert Number to Text devcon Word 0 07-10-2010 01:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft