Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
hassan barjini hassan barjini is offline
external usenet poster
 
Posts: 10
Default I would like replace

I would like replace all symboles with create with combination key (Ctrl
+' -')
by ( alt +'/') in all my text ?
is there any help
best


  #2   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default I would like replace

These are non-standard shortcuts (at least in English versions of Word). You
need to identify the characters. The following macro will do that:

Sub ANSIValue()
S1$ = "Because the selected text contains"
S2$ = " characters, not all of the ANSI values will be displayed."
S3$ = "ANSI Value ("
S4$ = " characters in selection)"
S5$ = " character in selection)"
S6$ = "Text must be selected before this macro is run."
S7$ = "ANSI Value"
Dim strSel As String
Dim strNums As String
Dim LastFourChar As String
Dim iPos As Integer
strSel = Selection.Text
If Len(strSel) 0 Then
For i = 1 To Len(strSel)
strNums = strNums + Str(Asc(Mid(strSel, i)))
Next i
strNums = LTrim(strNums)
If Len(strNums) 255 Then
LastFourChar = Mid(strNums, 252, 4)
strNums = Left(strNums, 251) + Left(LastFourChar, _
4 - InStr(" ", LastFourChar))
MsgBox S1$ + Str(Len(strSel)) + S2$
End If
If Len(strSel) = 1 Then S4$ = S5$
MsgBox strNums, 0, S3$ + LTrim(Str(Len(strSel))) + S4$
Else
MsgBox S6$, 0, S7$
End If
End Sub

http://www.gmayor.com/installing_macro.htm

Then replace the first character with the second
eg
replace
^032 (a space)
with
^0160 (a non breaking space)

See http://www.gmayor.com/replace_using_wildcards.htm for more information
on searching for ansi codes.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


hassan barjini wrote:
I would like replace all symboles with create with combination key
(Ctrl +' -')
by ( alt +'/') in all my text ?
is there any help
best



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using find and replace or macros to replace page ranges JeremyC Microsoft Word Help 7 February 13th 06 09:20 PM
BUG with replace command gds Microsoft Word Help 0 October 20th 05 07:39 PM
Search and Replace not working if I select a Format for Heading St Sherrie Deen Microsoft Word Help 0 April 27th 05 08:53 PM
Can't get Replace to work BruceM Microsoft Word Help 5 February 22nd 05 01:49 AM
Find and Replace anomaly BruceM Microsoft Word Help 7 January 18th 05 05:47 PM


All times are GMT +1. The time now is 04:36 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"