Sub CallSick()
'
' CallSick Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " C/S ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub ShiftTrade()
'
' ShiftTrade Macro
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorLightBlue
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " S/C ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
'Selection.Font.Color = wdColorLightBlue
'Selection.TypeText " "
End Sub
Sub Leaves()
'
' Leaves Macro
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorGreen
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " LOA ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorGreen
Selection.TypeText " "
End Sub
Sub PostOther()
'
' PostOther Macro
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorGreen
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " OTHER ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorGreen
Selection.TypeText " "
End Sub
Sub PostADOVAC()
'
' PostADOVAC Macro
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorGreen
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " ADO/VAC ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorGreen
Selection.TypeText " "
End Sub
Sub PostNA()
'
' PostNA Macro
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorGreen
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " NA# ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorGreen
Selection.TypeText " "
End Sub
Sub AddShift2()
'
' AddShift2 Macro
'
Selection.TypeParagraph
Selection.Font.Color = wdColorOrange
Selection.TypeText " Per/WBS: "
Selection.TypeText Text:=vbTab & vbTab & vbTab & vbTab
Selection.TypeText Text:=" POSITION" & vbTab & vbTab & _
" #### ####" & vbTab & vbTab & vbTab
Selection.Font.Underline = wdUnderlineSingle
Selection.TypeText " "
Selection.Font.Underline = wdUnderlineNone
Selection.Font.Color = wdColorAutomatic
End Sub
Sub AddShiftToday()
'
' AddShift2 Macro
'
Selection.TypeParagraph
Selection.Font.Color = wdColorTeal
Selection.TypeText " Per/WBS: "
Selection.TypeText Text:=vbTab & vbTab & vbTab & vbTab
Selection.TypeText Text:=" POSITION" & vbTab & vbTab & _
" #### ####" & vbTab & vbTab & vbTab
Selection.Font.Underline = wdUnderlineSingle
Selection.TypeText " "
Selection.Font.Underline = wdUnderlineNone
Selection.Font.Color = wdColorAutomatic
End Sub
Sub CallPersonal()
'
' CallPersonal Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " C/P "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallTransport()
'
' CallTransport Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " C/T ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallDependent()
'
' CallDependent Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " C/D ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallCFRA()
'
' CallCFRA Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " CFRA/FMLA ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallPDL()
'
' CallPDL Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " PDL ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallADOVAC()
'
' CallADOVAC Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " ADO/VAC ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallNA()
'
' CallNA Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " NA# ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallNCNS()
'
' CallNCNS Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " NCNS ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallOther()
'
' CallOther Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " OTHER ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub CallRain()
'
' CallRain Macro
'
'
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.Superscript = wdToggle
Selection.Font.Color = wdColorSkyBlue
Selection.TypeText " RAIN ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
End Sub
Sub Reset()
'
' Undo Reset
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorBlack
Selection.Collapse Direction:=wdCollapseEnd
End Sub
Sub Late()
'
' Calllate Macro
'
'
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.Superscript = wdToggle
Selection.Font.Color = wdColorRed
Selection.TypeText " LATE ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
End Sub
Sub LATECFRAPDL()
'
' LateCFRAPDL Macro
'
'
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.Superscript = wdToggle
Selection.Font.Color = wdColorRed
Selection.TypeText " LATE CFRA/PDL ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
End Sub
Sub TimeChange()
'
' Timechange Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorViolet
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.Font.Color = wdColorBlack
End Sub
Sub TOFROMDAYOF()
'
' TOFROMDAYOF Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorRed
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " TO: ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorRed
Selection.TypeText " "
End Sub
Sub TOFROMPOST()
'
' TOFROMPOST Macro
'
'
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Color = wdColorGreen
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.StrikeThrough = wdToggle
Selection.Font.Superscript = wdToggle
Selection.TypeText " TO: ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
Selection.Font.UnderlineColor = wdColorAutomatic
Selection.Font.Underline = wdUnderlineSingle
Selection.Font.Color = wdColorGreen
Selection.TypeText " "
End Sub
Sub Hightlight()
'
' Hightlight Macro
'
'
Selection.MoveRight Unit:=wdCharacter, Count:=9, Extend:=wdExtend
Options.DefaultHighlightColorIndex = wdYellow
Selection.Range.HighlightColorIndex = wdYellow
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=4
Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Options.DefaultHighlightColorIndex = wdYellow
Selection.Range.HighlightColorIndex = wdNoHighlight
Selection.MoveLeft Unit:=wdCharacter, Count:=5
End Sub
Sub PossCallIn()
'
' PossCallIn Macro
'
'
Selection.Collapse Direction:=wdCollapseEnd
Selection.Font.Superscript = wdToggle
Selection.Font.Color = wdColorRed
Selection.TypeText " Poss ("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME \* Lower ", PreserveFormatting:=True
Selection.TypeText ")"
Selection.Font.Superscript = wdToggle
Selection.TypeText " "
End Sub
Sub SendpdfTomorrow()
'Sends pdf of next day's dailies
'
On Error Resume Next
'Verify if the docment has been saved before so that we have a path to work with.
'If not, notify the user that there will be a safe dialog first.
If ActiveDocument.Path <> "" Then
ActiveDocument.Save
Else
Dim Msg, Style, Title, Response
Msg = "This document has not been saved before." & vbLf & _
"Please save the document to disk first." & vbLf & _
"Without saving first, only the pdf-file will be attached."
Style = vbInformation + vbOKOnly
Title = "Save current presentation"
Response = MsgBox(Msg, Style, Title)
Dim dlgSaveAs As FileDialog
Dim strCurrentFile As String
Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs)
If dlgSaveAs.Show = -1 Then
strCurrentFile = dlgSaveAs.SelectedItems(1)
ActiveDocument.SaveAs (strCurrentFile)
End If
Set dlgSaveAs = Nothing
End If
'Get the name of the open file and strip any extension.
Dim MyFile As String
MyFile = ActiveDocument.Name
intPos = InStrRev(MyFile, ".")
If intPos > 0 Then
MyFile = Left(MyFile, intPos - 1)
End If
'Get the user's TempFolder to store the created pdf item in.
Dim FSO As Object, TmpFolder As Object
Set FSO = CreateObject("scripting.filesystemobject")
Set FileName = FSO.GetSpecialFolder(2)
'Create the full path name for the pdf-file
FileName = FileName & "\" & MyFile & ".pdf"
'Save the current document as pdf in the user's temp folder.
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
FileName, ExportFormat:= _
wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=0, To:=0, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
'Declare an Outlook application an a mail item.
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
'Start Outlook if it isn't running.
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
End If
'Create a new message.
Set oItem = oOutlookApp.CreateItem(olMailItem)
'Add the attachments.
oItem.Attachments.Add FileName
oItem.Subject = "Cars Land Attractions Dailies - " & Date + 1
oItem.To = ""
oItem.CC = Environ$("Username")
oItem.Body = "Hello, attached are the dailies for business date: " & Date + 1 & ". Please note additional changes will be relayed during the course of business." & vbCrLf & "*Confidential* Do not distribute to unintended parties."
'oItem.Attachments.Add ActiveDocument.FullName
'Show the message.
oItem.Display
'Cleanup
Set FSO = Nothing
Set FileName = Nothing
Set oOutlookApp = Nothing
Set oItem = Nothing
'End With
End Sub
Sub SendpdfToday()
'Sends pdf of current day's dailies
'
On Error Resume Next
'Verify if the docment has been saved before so that we have a path to work with.
'If not, notify the user that there will be a safe dialog first.
If ActiveDocument.Path <> "" Then
ActiveDocument.Save
Else
Dim Msg, Style, Title, Response
Msg = "This document has not been saved before." & vbLf & _
"Please save the document to disk first." & vbLf & _
"Without saving first, only the pdf-file will be attached."
Style = vbInformation + vbOKOnly
Title = "Save current presentation"
Response = MsgBox(Msg, Style, Title)
Dim dlgSaveAs As FileDialog
Dim strCurrentFile As String
Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs)
If dlgSaveAs.Show = -1 Then
strCurrentFile = dlgSaveAs.SelectedItems(1)
ActiveDocument.SaveAs (strCurrentFile)
End If
Set dlgSaveAs = Nothing
End If
'Get the name of the open file and strip any extension.
Dim MyFile As String
MyFile = ActiveDocument.Name
intPos = InStrRev(MyFile, ".")
If intPos > 0 Then
MyFile = Left(MyFile, intPos - 1)
End If
'Get the user's TempFolder to store the created pdf item in.
Dim FSO As Object, TmpFolder As Object
Set FSO = CreateObject("scripting.filesystemobject")
Set FileName = FSO.GetSpecialFolder(2)
'Create the full path name for the pdf-file
FileName = FileName & "\" & MyFile & ".pdf"
'Save the current document as pdf in the user's temp folder.
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
FileName, ExportFormat:= _
wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=0, To:=0, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
'Declare an Outlook application an a mail item.
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
'Start Outlook if it isn't running.
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
End If
'Create a new message.
Set oItem = oOutlookApp.CreateItem(olMailItem)
'Add the attachments.
oItem.Attachments.Add FileName
oItem.Subject = "Updated Cars Land Attractions Dailies - " & Date & " " & Time
oItem.To = ""
oItem.CC = Environ$("Username")
oItem.Body = "UPDATED DAILIES: Please note, these dailies have been updated with additional changes from previous versions." & vbCrLf & "*Confidential* Do not distribute to unintended parties."
'oItem.Attachments.Add ActiveDocument.FullName
'Show the message.
oItem.Display
'Cleanup
Set FSO = Nothing
Set FileName = Nothing
Set oOutlookApp = Nothing
Set oItem = Nothing
'End With
End Sub
Sub SaveCopyToday()
Dim myCopy As Document
Dim docName As String
' Retrieve name of ActiveDocument
docName = ActiveDocument.Name
' Test if Activedocument has previously been saved
If ActiveDocument.Path = "" Then
' If not previously saved
MsgBox "Please save the document before proceeding."
Else
MsgBox "Today's Dailies local copy will now be updated."
' If previously saved, create a copy
Set myCopy = Documents.Add(ActiveDocument.FullName)
' Show SaveAs dialog to allow user to save copy
' With Dialogs(wdDialogFileSaveAs)
' Set name in SaveAs dialog
' .Name = "Copy_of_" & docName
' .Show
ActiveDocument.SaveAs FileName:="C:\Users\" & Environ$("Username") & "\Digital Dailies\" & "Today_Copy_" '& docName
' put this back between \dailies and today copy - & Environ$("Username") & "\Digital Dailies\"
ActiveDocument.Save
' End With
' Close copy
myCopy.Close
End If
End Sub
Sub SaveCopyTomorrow()
Dim myCopy As Document
Dim docName As String
' Retrieve name of ActiveDocument
docName = ActiveDocument.Name
' Test if Activedocument has previously been saved
If ActiveDocument.Path = "" Then
' If not previously saved
MsgBox "Please save the document before proceeding."
Else
MsgBox "Tomorrow's Dailies local copy will now be updated."
' If previously saved, create a copy
Set myCopy = Documents.Add(ActiveDocument.FullName)
' Show SaveAs dialog to allow user to save copy
' With Dialogs(wdDialogFileSaveAs)
' Set name in SaveAs dialog
' .Name = "Copy_of_" & docName
' .Show
ActiveDocument.SaveAs FileName:="C:\Users\" & Environ$("Username") & "\Digital Dailies\" & "Tomorrow_Copy_" '& docName
' put this back between \dailies and today copy - & Environ$("Username") & "\Digital Dailies\"
ActiveDocument.Save
' End With
' Close copy
myCopy.Close
End If
End Sub
Sub Macro1()
'
' Macro1 Macro
'
'
Options.DefaultHighlightColorIndex = wdNoHighlight
Selection.Range.HighlightColorIndex = wdNoHighlight
End Sub