|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Word Macro question...
I am trying to create a word macro that will replace all the extended characters in a document to their html counter-parts. For example:
Or, does someone know of a program that will take a word doc and replace all the extended characters with their html counter-parts? Symbol HTML — “ ” ‘ ’ Bold Text Italic Text HTML &# 151; &# 147; &# 148; &# 145; &# 146; <b.>whatever</b.> <i.>whatever</i.> I am able to replace all of the listed characters above but I cannot replace italic and bold tags and then save the macro and get it to load. I can do it manually but I need this to be automated as well. In other words, I setup the macro with all the settings and test and it works fine but as soon as I close out word and open back up the macro it works fine on everything but replacing bold and italic tags. Here is my code for those sections: Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "" .Replacement.Text = "<i>^&</i>" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With I think I need to specify some kind of character in the " .Text = "" area of my examle code above to get bold and italics to work correctly. Can anyone help me with this or point me to a macro that has already done this? Last edited by mstubble : June 23rd, 2003 at 10:47 AM. |
|
#2
|
|||
|
|||
|
Depending on what you are trying to achieve, you can use the Word "Save As" feature, and select web document.
__________________
How can I soar like an eagle when I'm flying with turkey's? |
|
#3
|
|||
|
|||
|
Well, I kind of just stated what I am trying to do and the 'save as' feature will not do anything for me in regard to my problem.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Word Macro question... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|