|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
Please help... I been searching online for few days... still can't find anything that works.
![]() In the code, I saw some xx.find.execute, but I have no idea how to use it, is that the old syntax for find and replace on vb? I just want to do a simple replace inside the vb code, to change the windows \ to web / and replace the .cfm to .html. I can run the code below in Word 2002, but my client is using Word 97 to integrate with her other apps using that Word document. I know the Word 2002 accept: fha = Replace(fha, ".cfm", ".html") But how to do the same thing on Word 97 macro? Thanks first! It's a really cool Word Macro that take word document and base on their style and then convert them into HTML with a help of a HTML template file. Anything that has "hyperlink" style is gonna be either a image or a real hyperlink to a file. The code: With fnd.Find .ClearFormatting .Style = "Hyperlink" .Format = True .Execute Forward:=True, findtext:="" fff = .Found If fff = True Then hlinks = hlinks + 1 fnd.Style = "Default Paragraph Font" ft = fnd.Text fha = LCase(fpd.Hyperlinks(hlinks).Address) fhs = LCase(fpd.Hyperlinks(hlinks).SubAddress) Rem: change the windows \ to web / and replace the .cfm to .html fha = Replace(fha, "\", "/") If InStr(fha, ".cfm") > 0 Then fha = Replace(fha, ".cfm", ".html") End If Last edited by tracytth : August 1st, 2003 at 01:12 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > How to do "replace" on Word 97 Macro? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|