-
Hi Froz,
Welcome to VBAX
Give this a try. You might need to play around with it a little but the principle is there.
[vba]Private Sub Document_New()
Dim Diff As Long, dt1 As Date, dt2 As Date, dt As String
Diff = 7 - Weekday(Now)
dt1 = Now + Diff - 5
dt2 = Now + Diff - 1
dt = "Week of " & Format(dt1, "dddd MMM d") & " - " & Format(dt2, "dddd MMM d")
ActiveDocument.Bookmarks("Test").Range = dt
End Sub
[/vba]
Last edited by mdmackillop; 02-27-2007 at 12:33 PM.
Reason: dt1 corrected
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules