Sub ConvertTimeCodes_seconds_hidedata() ' ConvertTimeCodes_seconds_hidedata Macro ' Macro created by Pablo Roufogalis L. ' Modified by David Woods Dim TimecodeTS As Variant Dim TimecodeRTF As Variant Dim H As String Dim M As String Dim S As String Dim T As String Selection.HomeKey Unit:=wdStory ActiveWindow.ActivePane.View.ShowAll = True Start: With Selection.Find .ClearFormatting .Text = "¤" End With Selection.Find.Execute If Selection.Find.Found = False Then GoTo Final Selection.Extend Character:=">" TimecodeTS = Selection.Text Selection.Font.Hidden = True Selection.Font.Color = wdColorBlack TimecodeRTF = "" TimecodeTS = Mid(TimecodeTS, 3, Len(TimecodeTS) - 3) H = Format(Int(TimecodeTS / 3600000), "00") M = Format(Int((TimecodeTS - H * 3600000) / 60000), "00") S = Format(Int((TimecodeTS - H * 3600000 - M * 60000) / 1000), "00") TimecodeRTF = "(" + H + ":" + M + ":" + S + ") " Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Font.Hidden = False Selection.Font.Color = wdColorBlack Selection.TypeText Text:=TimecodeRTF GoTo Start Final: ActiveWindow.ActivePane.View.ShowAll = False Selection.HomeKey Unit:=wdStory End Sub Sub ConvertTimeCodes_Milliseconds_hidedata() ' ConvertTimeCodes_Milliseconds_hidedata Macro ' Macro created by Pablo Roufogalis L. ' Modified by David Woods Dim TimecodeTS As Variant Dim TimecodeRTF As Variant Dim H As String Dim M As String Dim S As String Dim T As String Selection.HomeKey Unit:=wdStory ActiveWindow.ActivePane.View.ShowAll = True Start: With Selection.Find .ClearFormatting .Text = "¤" End With Selection.Find.Execute If Selection.Find.Found = False Then GoTo Final Selection.Extend Character:=">" Selection.Font.Hidden = True Selection.Font.Color = wdColorBlack TimecodeTS = Selection.Text TimecodeTS = Mid(TimecodeTS, 3, Len(TimecodeTS) - 3) H = Format(Int(TimecodeTS / 3600000), "00") M = Format(Int((TimecodeTS - H * 3600000) / 60000), "00") S = Format(Int((TimecodeTS - H * 3600000 - M * 60000) / 1000), "00") T = Format(Int((TimecodeTS - H * 3600000 - M * 60000 - S * 1000)), "000") TimecodeRTF = "(" + H + ":" + M + ":" + S + ":" + T + ") " Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Font.Hidden = False Selection.TypeText Text:=TimecodeRTF GoTo Start Final: ActiveWindow.ActivePane.View.ShowAll = False Selection.HomeKey Unit:=wdStory End Sub Sub ConvertTimeCodes_seconds_showdata() ' ConvertTimeCodes_seconds_hidedata Macro ' Macro created by Pablo Roufogalis L. ' Modified by David Woods Dim TimecodeTS As Variant Dim TimecodeRTF As Variant Dim H As String Dim M As String Dim S As String Dim T As String Selection.HomeKey Unit:=wdStory ActiveWindow.ActivePane.View.ShowAll = True Start: With Selection.Find .ClearFormatting .Text = "¤" End With Selection.Find.Execute If Selection.Find.Found = False Then GoTo Final Selection.Extend Character:=">" TimecodeTS = Selection.Text Selection.Font.Hidden = False Selection.Font.Color = wdColorBlack TimecodeRTF = "" TimecodeTS = Mid(TimecodeTS, 3, Len(TimecodeTS) - 3) H = Format(Int(TimecodeTS / 3600000), "00") M = Format(Int((TimecodeTS - H * 3600000) / 60000), "00") S = Format(Int((TimecodeTS - H * 3600000 - M * 60000) / 1000), "00") TimecodeRTF = "(" + H + ":" + M + ":" + S + ") " Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Font.Hidden = False Selection.Font.Color = wdColorBlack Selection.TypeText Text:=TimecodeRTF GoTo Start Final: ActiveWindow.ActivePane.View.ShowAll = False Selection.HomeKey Unit:=wdStory End Sub Sub ConvertTimeCodes_Milliseconds_showdata() ' ConvertTimeCodes_Milliseconds_hidedata Macro ' Macro created by Pablo Roufogalis L. ' Modified by David Woods Dim TimecodeTS As Variant Dim TimecodeRTF As Variant Dim H As String Dim M As String Dim S As String Dim T As String Selection.HomeKey Unit:=wdStory ActiveWindow.ActivePane.View.ShowAll = True Start: With Selection.Find .ClearFormatting .Text = "¤" End With Selection.Find.Execute If Selection.Find.Found = False Then GoTo Final Selection.Extend Character:=">" Selection.Font.Hidden = False Selection.Font.Color = wdColorBlack TimecodeTS = Selection.Text TimecodeTS = Mid(TimecodeTS, 3, Len(TimecodeTS) - 3) H = Format(Int(TimecodeTS / 3600000), "00") M = Format(Int((TimecodeTS - H * 3600000) / 60000), "00") S = Format(Int((TimecodeTS - H * 3600000 - M * 60000) / 1000), "00") T = Format(Int((TimecodeTS - H * 3600000 - M * 60000 - S * 1000)), "000") TimecodeRTF = "(" + H + ":" + M + ":" + S + ":" + T + ") " Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Font.Hidden = False Selection.TypeText Text:=TimecodeRTF GoTo Start Final: ActiveWindow.ActivePane.View.ShowAll = False Selection.HomeKey Unit:=wdStory End Sub Sub HideTimeCodes() ' HideTimeCodes Macro ' Macro created by David Woods Selection.HomeKey Unit:=wdStory ActiveWindow.ActivePane.View.ShowAll = True Start: With Selection.Find .ClearFormatting .Text = "¤" End With Selection.Find.Execute If Selection.Find.Found = False Then GoTo Final Selection.Extend Character:=">" TimecodeTS = Selection.Text Selection.Font.Hidden = True Selection.Font.Color = wdColorBlack Selection.MoveRight Unit:=wdCharacter, Count:=1 GoTo Start Final: ActiveWindow.ActivePane.View.ShowAll = False Selection.HomeKey Unit:=wdStory End Sub Sub StripTimeCodeData() ' StripTimeCodes Macro ' Macro created by David Woods Selection.HomeKey Unit:=wdStory ActiveWindow.ActivePane.View.ShowAll = True Start: With Selection.Find .ClearFormatting .Text = "¤" End With Selection.Find.Execute If Selection.Find.Found = False Then GoTo Final Selection.Extend Character:=">" Selection.Font.Hidden = True TimecodeTS = Selection.Text Selection.Delete GoTo Start Final: ActiveWindow.ActivePane.View.ShowAll = False Selection.HomeKey Unit:=wdStory End Sub Sub AutoTimeCode() ' AutoTimeCode450 Macro ' This macro places a time code between each word in a document. There are circumstances where this sort ' of auto time-coding can be useful, especially when a blank audio file is used. ' Macro created by David Woods TimeCodeInterval = 450 Selection.HomeKey Unit:=wdStory ActiveWindow.ActivePane.View.ShowAll = True ' Doubled Space characters cause problems. Clear them repeatedly. ClearDupSpaces: Selection.HomeKey Unit:=wdStory With Selection.Find .ClearFormatting .Text = " " End With Selection.Find.Execute Selection.TypeText Text:=" " If Selection.Find.Found = True Then GoTo ClearDupSpaces Selection.HomeKey Unit:=wdStory TimeVal = 0 SpacesCleared: With Selection.Find .Text = " " End With Selection.Find.Execute Selection.TypeText Text:="¤<" + Str(TimeVal) + "> " TimeVal = TimeVal + TimeCodeInterval If Selection.Find.Found = True Then GoTo SpacesCleared Selection.HomeKey Unit:=wdStory ClearTCSpaces: With Selection.Find .ClearFormatting .Text = "¤< " End With Selection.Find.Execute Selection.TypeText Text:="¤<" If Selection.Find.Found = True Then GoTo ClearTCSpaces Final: ActiveWindow.ActivePane.View.ShowAll = False Selection.HomeKey Unit:=wdStory End Sub