It seems the Calendar Macros are not designed for a Changing date header. Using Bings Chat GPT it suggested the following but, Insert Character is not showing up in Corel 2023. Otherwise it sounds like this method might work.To format a date line in CorelDRAW, you can use the Text tool to insert a text frame and type the date format you want, such as YYYY-MM-DD (WW). Then, you can select the text frame and go to Text > Insert Character > Date/Time. This will open a dialog box where you can choose the date format and the update option. You can select Update on open to make the date changeable on each new page. I thought to create a column in Excel and try a print merge but Excel does not seem to like my chosen text and numbers date type. In some respects a calendar Macro like Oberon could be useful in allowing it to show all the holidays but does npt seem to intend it to be just a line on a 5.5x8.5 tall agenda.Suggestions?
YYYY-MM-DD (WW)
Sub Macro1() Dim p As Page, Dt As Date, i&, k& Dt = CDate("1-1-2024") 'Enter the starting date of the calendar here k = 7 'Enter the number of days for the calendar here '(this affects the speed of macro execution)
ActivePage.Name = Format(CStr(Dt), "yyyy-mm-dd") For i = 1 To k - 1 Set p = ActiveDocument.InsertPages(1, False, ActiveDocument.Pages.Count) p.Name = Format(CStr(Dt + i), "yyyy-mm-dd") Next iEnd SubTry this.RegardsTaras
Thank you, looking at what you provided I do not see a mention of the weekday, Monday, Tuesday, etc.
I had an issue with Visual Studio installing Community version it appears the 2019 version needs to be installed so as to install the Visual Studio Tools 2019 version. I saved your script and running it creates multiple pages but blank. The blank pages shows them named 2024-01-01, and 2024-01-02 .