Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
Dim tbl As Table Dim rw As Row Dim cl As Cell Dim c As Integer Dim iStartCol As Integer Dim StartDate, EndDate, MyDate As Date StartDate = CDate(ActiveDocument.CustomDocumentProperties.Item("xBeginDate")) EndDate = CDate(ActiveDocument.CustomDocumentProperties.Item("xEndDate")) iStartCol = 1 Set tbl = ActiveDocument.Tables(1) 'Add rows for each day from StartDate to EndDate Do While StartDate <= EndDate 'if date is a weekend then do nothing If IsWeekend(StartDate) = True Then Else Set rw = tbl.Rows.Add c = iStartCol rw.Cells(c).Range.Text = Format(StartDate, "dddd, d mmmm") End If StartDate = StartDate + 1 Loop End Sub Public Function IsWeekend(InputDate As Date) As Boolean Select Case Weekday(InputDate) Case vbSaturday, vbSunday IsWeekend = True Case Else IsWeekend = False End Select End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.