From 78c43d8211f4346b759804464024a0eee8ea8673 Mon Sep 17 00:00:00 2001 From: thangarson Date: Wed, 11 Aug 2004 21:26:28 +0000 Subject: [PATCH] This revision is from 06-14-04. All changes primarily to the NewMacros code. --- WordToXML/ItalicOptions.frm | 2 +- WordToXML/ItalicOptions.frx | Bin 3096 -> 3096 bytes WordToXML/NewMacros.bas | 53 +++++++++++++++++++++++++++++++----- 3 files changed, 47 insertions(+), 8 deletions(-) diff --git a/WordToXML/ItalicOptions.frm b/WordToXML/ItalicOptions.frm index 886afab..f2394ec 100644 --- a/WordToXML/ItalicOptions.frm +++ b/WordToXML/ItalicOptions.frm @@ -5,7 +5,7 @@ Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} ItalicOptions ClientLeft = 30 ClientTop = 480 ClientWidth = 7125 - OleObjectBlob = "ItalicOptions061104.frx":0000 + OleObjectBlob = "ItalicOptions061404.frx":0000 StartUpPosition = 1 'CenterOwner End Attribute VB_Name = "ItalicOptions" diff --git a/WordToXML/ItalicOptions.frx b/WordToXML/ItalicOptions.frx index 92d0c7b1995927a82e1d1c76c67ca4ed9fde5d5e..876229128a09c2ae894bc55bade9ef9f0c638bad 100644 GIT binary patch delta 29 lcmbOsF+*ZQD+{wxR@3GV7CRQkcax8EI5WQ6%+1Nm3;>y(36=l= delta 29 lcmbOsF+*ZQD+{w!M9k(67CRQkmy?fkI5WQ7%+1Nm3;>f62|NG* diff --git a/WordToXML/NewMacros.bas b/WordToXML/NewMacros.bas index dc8a440..0863128 100644 --- a/WordToXML/NewMacros.bas +++ b/WordToXML/NewMacros.bas @@ -111,7 +111,37 @@ Attribute convert.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.Macro1" For n = 0 To c Selection.TypeText Text:=outDoc(n) Next n - + Selection.Find.ClearFormatting + Selection.Find.Replacement.ClearFormatting + With Selection.Find + .Text = "&" + .Replacement.Text = "&" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + Selection.Find.ClearFormatting + Selection.Find.Replacement.ClearFormatting + With Selection.Find + .Text = "&" + .Replacement.Text = "&" + .Forward = True + .Wrap = wdFindContinue + .Format = False + .MatchCase = False + .MatchWholeWord = False + .MatchWildcards = False + .MatchSoundsLike = False + .MatchAllWordForms = False + End With + Selection.Find.Execute Replace:=wdReplaceAll + MsgBox ("Conversion Done! Paste contents of new document into XML editor.") End Sub Sub doHeaders() @@ -415,9 +445,10 @@ Function iterateRange(ByVal rng) ElseIf char1.Style = "Hyperlink,hl" Then textToDis = char1.Hyperlinks(1).TextToDisplay - outStr = Left(outStr, Len(outStr) - (14 + Len(textToDis))) - outStr = outStr & "" _ - & textToDis & "" + leftPt = InStr(outStr, " HYPERLINK") - 1 + outStr = Left(outStr, leftPt) + outStr = outStr & "" _ + & textToDis & "" n = n + Len(textToDis) Else: @@ -439,6 +470,13 @@ Function iterateRange(ByVal rng) Application.StatusBar = statusStr End If Next n + If InStr(outStr, "HYPERLINK") Then + sInd = InStr(outStr, " HYPERLINK") + hind = InStr(outStr, "http") + eInd = InStr(hind, outStr, """") + linkURL = Mid(outStr, hind, eInd - hind) + outStr = "" & Mid(outStr, (eInd + 2)) & "" + End If iterateRange = outStr & closeTag End Function Function iterateNote(ByVal rng As Range) @@ -463,9 +501,10 @@ Function iterateNote(ByVal rng As Range) ElseIf char1.Style = "Hyperlink,hl" Then textToDis = char1.Hyperlinks(1).TextToDisplay - outStr = Left(outStr, Len(outStr) - 1) - outStr = outStr & "" _ - & textToDis & "" + leftPt = InStr(outStr, " HYPERLINK") - 1 + outStr = Left(outStr, leftPt) + outStr = outStr & "" _ + & textToDis & "" ct = ct + Len(textToDis) - 2 Else: