Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-29-2016, 07:03 AM
kmawhood kmawhood is offline Macro help - converting proprietary encoding to unicode, keep formatting Windows 10 Macro help - converting proprietary encoding to unicode, keep formatting Office 2010 64bit
Novice
Macro help - converting proprietary encoding to unicode, keep formatting
 
Join Date: Apr 2016
Posts: 2
kmawhood is on a distinguished road
Default

Thanks – I couldn't get your macro to work, but I tried looking at this again. If I can do it like this, I'm there. It's just a case of figuring out how to make this work with unicode on the line StrNew = "α,β,γ"

HTML Code:
' ConvertTable Macro
Sub ConvertTable()
Dim StrOld As String, StrNew As String
Dim RngFind As Range, RngTxt As Range, i As Long
StrOld = "a,b,c"
StrNew = "α,β,γ"
Set RngTxt = Selection.Range
For i = 0 To UBound(Split(StrOld, ","))
  Set RngFind = RngTxt.Duplicate
  With RngFind.Find
         ' Clear all previously set formatting for Find dialog box.
         .ClearFormatting
         ' Set font to Find for replacement.
         .Font.Name = "bwgrkl"
         ' Clear all previously set formatting for Replace dialog box.
         .Replacement.ClearFormatting
         ' Set font to Replace found font.
         .Replacement.Font.Name = "Arial Unicode MS"
         ' Don't find or replace any text.
         .Text = Split(StrOld, ",")(i)
         .Replacement.Text = Split(StrNew, ",")(i)
         .Format = True
         .MatchCase = True
         .MatchWholeWord = False
         .MatchWildcards = False
         .MatchSoundsLike = False
         .MatchAllWordForms = False
         .Execute Replace:=wdReplaceAll
  End With
Next
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro help - converting proprietary encoding to unicode, keep formatting Fixing/stabilizing/setting/securing/converting markup of tracked changes into "hard" formatting paulkaye Word 6 08-20-2015 02:36 AM
Macro help - converting proprietary encoding to unicode, keep formatting Custom Dictionary & Unicode encoding? markus staubmann Word 3 03-28-2012 05:23 AM
Macro help - converting proprietary encoding to unicode, keep formatting Outlook macro for automatically converting plain text to link? nrogers64 Outlook 1 09-17-2010 01:35 AM
Macro help - converting proprietary encoding to unicode, keep formatting Unicode Encoding Type Rose44 Excel 2 08-09-2009 09:05 PM
Having some formatting issues after converting PDF to .doc amf25 Word 1 06-05-2009 02:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:54 PM.


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