THEO TODMAN’S WEBSITE CODE PAGES



This Page provides a jumping-off point for the VBA Code that generates my Website.

Table of Code Documentation Location 33 (2 items)

cmdRegenerateArchivedNote_ClickOutputNotesWebPage..

To access information, click on one of the links in the table above.

Go to top of page




Source Code of: cmdRegenerateArchivedNote_Click
Procedure Type: Private Sub
Module: Form_Notes_Archive_Regen
Lines of Code: 88
Go To End of This Procedure

Line-No. / Ref.Code Line
0001Private Sub cmdRegenerateArchivedNote_Click()
0002Dim Note_ID As Integer
0003Dim Note_Timestamp As Long
0004Dim StartTime As Date
0005Dim Duration
0006Dim rsTableToRead As Recordset
0007Dim strQuery As String
0008Dim i As Long
0009Dim ID_Start As Integer
0010i = 0
0011ID_Start = 0
0012If [Forms]![Notes_Archive_Regen]![Combo1] & "" = "" Then
0013 If [Forms]![Notes_Archive_Regen]![Combo5] & "" <> "" Then
0014 If MsgBox("Do you want to regenerate all the archived Notes >= a certain ID?", vbYesNo) = vbYes Then
0015 StartTime = Now()
0016 ID_Start = Val([Forms]![Notes_Archive_Regen]![Combo5])
0017 If ID_Start > 0 Then
0018 GoTo TheLot
0019 Else
0020 MsgBox ("Parameters entered incorrectly; try again!")
0021 End If
0022 Else
0023 MsgBox ("Enter the parameters then!")
0024 End If
0025 Else
0026 If MsgBox("Do you want to regenerate all the archived Notes?", vbYesNo) = vbYes Then
0027 StartTime = Now()
0028 GoTo TheLot
0029 Else
0030 MsgBox ("Enter the parameters then!")
0031 End If
0032 End If
0033Else
0034 Note_ID = [Forms]![Notes_Archive_Regen]![Combo1]
0035 If [Forms]![Notes_Archive_Regen]![Combo3] & "" = "" Then
0036 If MsgBox("Do you want to regenerate all the archived Notes for Note " & Note_ID & "?", vbYesNo) = vbYes Then
0037 StartTime = Now()
0038 GoTo AllForANote
0039 Else
0040 MsgBox ("Enter the Timestamp parameter then!")
0041 End If
0042 Else
0043 Note_Timestamp = [Forms]![Notes_Archive_Regen]![Combo3]
0044 StartTime = Now()
0045 OK = OutputNotesWebPage_Archived(Note_ID, Note_Timestamp)
0046 i = 1
0047 End If
0048End If
0049GoTo TheEnd
0050AllForANote:
0051i = 0
0052 strQuery = "SELECT [ID], [Timestamp] FROM Notes_Archive WHERE [ID] = " & Note_ID & " ORDER BY [ID], [Timestamp]; "
0053Set rsTableToRead = CurrentDb.OpenRecordset(strQuery)
0054If Not rsTableToRead.EOF Then
0055 rsTableToRead.MoveFirst
0056 Do While Not rsTableToRead.EOF
0057 Note_ID = rsTableToRead.Fields(0)
0058 Note_Timestamp = rsTableToRead.Fields(1)
0059 OK = OutputNotesWebPage_Archived(Note_ID, Note_Timestamp)
0060 rsTableToRead.MoveNext
0061 i = i + 1
0062 Loop
0063End If
0064GoTo TheEnd
0065TheLot:
0066i = 0
0067 strQuery = "SELECT [ID], [Timestamp] FROM Notes_Archive WHERE [ID] >= " & ID_Start & " ORDER BY [ID], [Timestamp]; "
0068Set rsTableToRead = CurrentDb.OpenRecordset(strQuery)
0069If Not rsTableToRead.EOF Then
0070 rsTableToRead.MoveFirst
0071 Do While Not rsTableToRead.EOF
0072 Note_ID = rsTableToRead.Fields(0)
0073 Note_Timestamp = rsTableToRead.Fields(1)
0074 OK = OutputNotesWebPage_Archived(Note_ID, Note_Timestamp)
0075 rsTableToRead.MoveNext
0076 i = i + 1
0077 Loop
0078End If
0079TheEnd:
0080Duration = (Now() - StartTime) * 24 * 60
0081If Duration < 1 Then
0082 Duration = Round(Duration * 60)
0083 MsgBox Now() & ": Notes Archive Webpage Creation Complete in " & Duration & " seconds. " & i & " Pages output. ", vbOKOnly, "Create Notes Archive Web Pages"
0084Else
0085 Duration = Round(Duration, 2)
0086 MsgBox Now() & ": Notes Archive Webpage Creation Complete in " & Duration & " minutes. " & i & " Pages output. ", vbOKOnly, "Create Notes Archive Web Pages"
0087End If
0088End Sub

Procedures Called By This Procedure (cmdRegenerateArchivedNote_Click) Tables / Queries / Fragments Directly Used By This Procedure (cmdRegenerateArchivedNote_Click) Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page



Source Code of: OutputNotesWebPage
Procedure Type: Public Sub
Module: General_Subroutines
Lines of Code: 640
Go To End of This Procedure

Line-No. / Ref.Code Line
0001Public Sub OutputNotesWebPage(Note_ID)
0002Dim fsoTextFile As FileSystemObject
0003Dim tsTextFile As TextStream
0004Dim rsTableToRead As Recordset
0005Dim rsTableControl As Recordset
0006Dim rsFooterControl As Recordset
0007Dim rsTableControl2 As Recordset
0008Dim rsNotesLinks As Recordset
0009Dim rsNotesPreviousLinks As Recordset
0010Dim rsFNCheck As Recordset
0011Dim rsSub_Notes As Recordset
0012Dim strControlQuery As String
0013Dim strLine As String
0014Dim x As Long
0015Dim Y As String
0016Dim z As Long
0017Dim strNotesRoot As String
0018Dim strNotesRootSecure As String
0019Dim strNotesTitle_Saved As String
0020Dim iNotes_Title_Index As Integer
0021Dim Frozen_Timestamp As Long
0022Dim Duration
0023Dim DatePrint As Date
0024Dim FootNoteTimestamp As Long
0025Dim strDirectory As String
0026Dim Notes_Group_Name As String
0027Dim strNote As String
0028Dim i As Integer
0029Dim Notes_Subdirectory As String
0030Dim Temp_Note_ID
0031Dim PreviousVersionCount As Integer
0032Dim strQuery As String
0033Dim strPrefix As String
0034Dim strMulti_Prints As String
0035Dim Last_Footnote_Bulletted As String
0036Dim strLine_Break As String
0037Dim Total_Previous As Integer
0038Dim Done As String
0039Dim strColoured_Note As String
0040Dim strColour As String
0041Dim strDup_FNs As String
0042Dim Note_Text As String
0043Dim NameRef As String
0044Dim Output_Date As Date
0045'Read the Note
0046 strControlQuery = "SELECT Notes_List_Auto.* FROM Notes_List_Auto WHERE Notes_List_Auto.ID = " & Note_ID & ";"
0047Set rsTableToRead = CurrentDb.OpenRecordset(strControlQuery)
0048'Notes_List_Auto Fields
0049'0 = ID
0050'1 = Item_Title
0051'2 = Item_Text
0052'3 = Jump_Table?
0053'4 = Note_Group
0054'5 = Master Note
0055'6 = Last_Changed
0056'7 = Private?
0057'8 = ReadingList?
0058'9 = Title?
0059'10 = Respondent?
0060'11 = Status
0061'12 = Frozen_Timestamp
0062'13 = Immediate_Promotion
0063'14 = Note_Quality
0064'15 = Temp_Note_Timestamp
0065If rsTableToRead.EOF Then
0066 MsgBox ("Note " & rsTableToRead.Fields(0) & " (" & rsTableToRead.Fields(1) & ") does not exist. ")
0067 Exit Sub
0068Else
0069 rsTableToRead.MoveFirst
0070End If
0071strNotesRoot = TheoWebsiteRoot & "\Notes\"
0072strNotesRootSecure = TheoWebsiteRoot & "\Secure_Jen\"
0073strLine = ""
0074Set fsoTextFile = Nothing
0075Set fsoTextFile = New FileSystemObject
0076'Attempt to clear the text object by updating a dummy page (otherwise if print the same note twice (without compact/repair), concatenates two sets of HTML)
0077strFolder = strNotesRoot
0078strFileName = "Dummy.htm"
0079Set tsTextFile = fsoTextFile.CreateTextFile(strFolder & strFileName, True, True)
0080strLine = "<HTML>Dummy</HTML>"
0081tsTextFile.WriteLine strLine
0082Set tsTextFile = Nothing
0083 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = ""Notes"") And ((Website_Control.Section) = ""Text"")) ORDER BY Website_Control.Line;"
0084Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery)
0085 Clear_Colour_Usage
0086Notes_Group_Name = rsTableToRead.Fields(4)
0087If rsTableToRead.Fields(4) = "Supervisions" Then
0088 strFolder = strNotesRootSecure
0089Else
0090 strFolder = strNotesRoot
0091End If
0092'Find the Sub-directory
0093 Notes_Subdirectory = Find_New_Directory(rsTableToRead.Fields(0))
0094Notes_Subdirectory = "Notes_" & Notes_Subdirectory & "\"
0095strFolder = strFolder & Notes_Subdirectory
0096strFileName = "Notes_" & rsTableToRead.Fields(0) & ".htm"
0097Set tsTextFile = fsoTextFile.CreateTextFile(strFolder & strFileName, True, True)
0098'Find how many previous versions
0099 strControlQuery = "SELECT Notes_Archive.Timestamp, Notes_Archive.Item_Title, Len(Notes_Archive.Item_Text), CDate([Timestamp]/1000) AS [Time Stamp], Notes.Status FROM (Notes_Archive INNER JOIN Notes_Archive_Latest_Time ON Notes_Archive.ID = Notes_Archive_Latest_Time.ID) INNER JOIN Notes ON Notes_Archive.ID = Notes.ID WHERE (((Notes_Archive.Timestamp) <> [MaxOfTimestamp]) And ((Notes_Archive.ID) = " & rsTableToRead.Fields(0) & ")) Or (((Notes_Archive.Timestamp) = [MaxOfTimestamp]) And ((Notes_Archive.ID) = " & rsTableToRead.Fields(0) & ") And ((Notes.Status) = ""Temp"")) ORDER BY Notes_Archive.Timestamp DESC;"
0100Set rsNotesPreviousLinks = CurrentDb.OpenRecordset(strControlQuery) 'Just use this recordset (even though we're not "doing" NotesLinks)!
0101PreviousVersionCount = rsNotesPreviousLinks.RecordCount
0102'Format the pages
0103rsTableControl.MoveFirst
0104Do While Not rsTableControl.EOF
0105 strLine = rsTableControl.Fields(0) & ""
0106 x = InStr(1, strLine, "**TITLE1**")
0107 If x > 0 Then
0108 If rsTableToRead.Fields(9) = True Then
0109 strLine = Left(strLine, x - 1) & "Note: " & rsTableToRead.Fields(4) & " - " & rsTableToRead.Fields(1) & " (Theo Todman's Web Page)" & Mid(strLine, x + 10, Len(strLine))
0110 Else
0111 strLine = Left(strLine, x - 1) & "Note: " & rsTableToRead.Fields(4) & " (Theo Todman's Web Page)" & Mid(strLine, x + 10, Len(strLine))
0112 End If
0113 End If
0114 x = InStr(1, strLine, "**TITLE2**")
0115 If x > 0 Then
0116 If rsTableToRead.Fields(4) = "Control" Then
0117 If rsTableToRead.Fields(9) = False Then
0118 strLine = Left(strLine, x - 1) & Mid(strLine, x + 10, Len(strLine))
0119 Else
0120 strLine = Left(strLine, x - 1) & "<h2>" & rsTableToRead.Fields(1) & Mid(strLine, x + 10, Len(strLine)) & "</h2><hr>"
0121 End If
0122 Else
0123 If rsTableToRead.Fields(9) = False Then
0124 strLine = Left(strLine, x - 1) & "<h1>Theo Todman's Web Page - Notes Pages</h1><hr><h2>" & rsTableToRead.Fields(4) & "</h2>" & Mid(strLine, x + 10, Len(strLine))
0125 Else
0126 strLine = Left(strLine, x - 1) & "<h1>Theo Todman's Web Page - Notes Pages</h1><hr><h2>" & rsTableToRead.Fields(4) & "</h2><h3>" & rsTableToRead.Fields(1) & Mid(strLine, x + 10, Len(strLine)) & "</h3>"
0127 End If
0128 End If
0129 If rsTableToRead.Fields(10) = True Then 'Respondent's Comment
0130 strLine = strLine & "<CENTER>(CORRESPONDENT'S COMMENTS)</CENTER>"
0131 Colour_Table(2, 4) = 1
0132 Else
0133 Colour_Table(1, 4) = 1
0134 End If
0135 strLine = strLine & "<p class = ""Centered"">"
0136 If (rsTableToRead.Fields(11) & "") = "Temp" Then
0137 If rsTableToRead.Fields(15) > 0 Then
0138 Output_Date = rsTableToRead.Fields(15) / 1000
0139 Else
0140 Output_Date = Now()
0141 End If
0142 strLine = strLine & "(Work In Progress: output at " & Output_Date & ")"
0143 Else
0144 strLine = strLine & "(Text as at " & CDate(Nz(rsTableToRead.Fields(6).Value) / 1000) & ")"
0145 End If
0146 'Output Table of Links within this page
0147 strLine = strLine & "<center><TABLE class = ""ReadingList"" WIDTH=700><TR>"
0148 If InStr(rsTableToRead.Fields(2), "|Colour_2|") > 0 Then
0149 strLine = strLine & "<TH class = ""BridgeCenter""><A HREF = ""#ColourConventions"">Colour Conventions</A></TH>"
0150 End If
0151 If PreviousVersionCount > 0 Then
0152 strLine = strLine & "<TH class = ""BridgeCenter""><A HREF = ""#TableOfPreviousVersions"">Previous Versions</A></TH>"
0153 End If
0154 strControlQuery = "SELECT Cross_Reference.Called_ID, 0 AS Called_Ref, Notes.Item_Title, Notes_1.Note_Group, Notes.Note_Group, Note_Qualities.Note_Quality_Text, Note_Qualities.Note_Quality_Colour FROM ((Cross_Reference INNER JOIN Notes ON Cross_Reference.Called_ID = Notes.ID) INNER JOIN Notes AS Notes_1 ON Cross_Reference.Calling_ID = Notes_1.ID) LEFT JOIN Note_Qualities ON Notes.Note_Quality = Note_Qualities.Note_Quality WHERE (((Cross_Reference.Calling_ID) = " & rsTableToRead.Fields(0) & ") And ((Cross_Reference.Calling_Type) = ""N"") And ((Cross_Reference.Called_Type) = ""N"") And ((Cross_Reference.Calling_Timestamp) = 0) And ((Cross_Reference.Called_Timestamp) = 0)) GROUP BY Cross_Reference.Called_ID, 0, Notes.Item_Title, Notes_1.Note_Group, Notes.Note_Group, Note_Qualities.Note_Quality_Text, Note_Qualities.Note_Quality_Colour ORDER BY Notes.Item_Title;"
0155 Set rsNotesLinks = CurrentDb.OpenRecordset(strControlQuery)
0156 If Not rsNotesLinks.EOF Then
0157 strLine = strLine & "<TH class = ""BridgeCenter""><A HREF = ""#TableOfLinksOut"">Note References</A></TH>"
0158 End If
0159 Set rsNotesLinks = Nothing
0160 Set rsSub_Notes = CurrentDb.OpenRecordset("Select Note_Groups![ReadingList?] From Note_Groups Where Note_Groups.Note_Group = """ & rsTableToRead.Fields(4) & """;")
0161 rsSub_Notes.MoveFirst 'Use random rs!
0162 If rsSub_Notes.Fields(0).Value = "Yes" Then
0163 strLine = strLine & "<TH class = ""BridgeCenter""><A HREF = ""#TableOfReferences"">Non-Note References</A></TH>"
0164 End If
0165 Set rsSub_Notes = Nothing
0166 strControlQuery = "SELECT Cross_Reference.Calling_ID, Cross_Reference.Calling_NameRef, Notes.Item_Title, Notes.Note_Group, Notes_1.Note_Group, Note_Qualities.Note_Quality_Text, Note_Qualities.Note_Quality_Colour FROM ((Cross_Reference INNER JOIN Notes ON Cross_Reference.Calling_ID = Notes.ID) INNER JOIN Notes AS Notes_1 ON Cross_Reference.Called_ID = Notes_1.ID) LEFT JOIN Note_Qualities ON Notes.Note_Quality = Note_Qualities.Note_Quality WHERE (((Cross_Reference.Calling_ID)<>[Called_ID]) And ((Cross_Reference.Called_ID) = " & rsTableToRead.Fields(0) & ") And ((Cross_Reference.Calling_Type) = ""N"") And ((Cross_Reference.Called_Type) = ""N"") And ((Cross_Reference.Calling_Timestamp) = 0) And ((Cross_Reference.Called_Timestamp) = 0)) ORDER BY Notes.Item_Title, Cross_Reference.Calling_NameRef;"
0167 Set rsNotesLinks = CurrentDb.OpenRecordset(strControlQuery)
0168 If Not rsNotesLinks.EOF Then
0169 strLine = strLine & "<TH class = ""BridgeCenter""><A HREF = ""#TableOfLinksIn"">Note Citations</A></TH>"
0170 End If
0171 Set rsNotesLinks = Nothing
0172 OK = AddCitations_List("Note", rsTableToRead.Fields(0), tsTextFile, "Non-Print", True)
0173 If OK > 0 Then
0174 strLine = strLine & "<TH class = ""BridgeCenter""><A HREF = ""#TableOfCitations"">Non-Note Citations</A></TH>"
0175 End If
0176 strLine = strLine & "</tr></TABLE></center><br><hr>"
0177 End If
0178 x = InStr(1, strLine, "**TEXT**")
0179 If x > 0 Then
0180 'Check if there are Sub_Notes, and if so refresh the Note Text from them ...
0181 strControlQuery = "SELECT * FROM SUB_Notes WHERE ID = " & Note_ID & " ORDER BY Sequence;"
0182 Set rsSub_Notes = CurrentDb.OpenRecordset(strControlQuery)
0183 If Not rsSub_Notes.EOF Then
0184 rsSub_Notes.MoveFirst
0185 Note_Text = ""
0186 'Concatenate the Notes text ...
0187 Do Until rsSub_Notes.EOF
0188 Note_Text = Note_Text & rsSub_Notes.Fields(2)
0189 rsSub_Notes.MoveNext
0190 Loop
0191 If (rsTableToRead.Fields(11) & "" = "Temp") Then 'Temp Note
0192 'Check for Functors
0193 OK = Functor(rsTableToRead.Fields(0), rsTableToRead.Fields(1), Note_Text)
0194 End If
0195 'Update the Note
0196 Set rsTableToRead = Nothing
0197 strControlQuery = "SELECT * FROM Notes WHERE ID = " & Note_ID & ";"
0198 Set rsTableToRead = CurrentDb.OpenRecordset(strControlQuery)
0199 rsTableToRead.MoveFirst
0200 rsTableToRead.Edit
0201 rsTableToRead.Fields(3) = Note_Text
0202 rsTableToRead.Update
0203 Set rsTableToRead = Nothing
0204 strControlQuery = "SELECT Notes_List_Auto.* FROM Notes_List_Auto WHERE Notes_List_Auto.ID = " & Note_ID & ";"
0205 Set rsTableToRead = CurrentDb.OpenRecordset(strControlQuery)
0206 rsTableToRead.MoveFirst
0207 End If
0208 Set rsSub_Notes = Nothing
0209 strLine = Left(strLine, x - 1) & IIf(rsTableToRead.Fields(10) = True, "|Colour_2|", "|Colour_1|") & rsTableToRead.Fields(2) & Mid(strLine, x + 8, Len(strLine))
0210 Frozen_Timestamp = rsTableToRead.Fields(12)
0211 Notes_Group_Name = rsTableToRead.Fields(4)
0212 OK = Notes_Text_Format(rsTableToRead.Fields(0), "N/A", strLine, Frozen_Timestamp, Notes_Group_Name) 'Use "Frozen_Timestamp" to indicate if need to timestamp the hyperlinks ... but it never seems to be used?
0213 End If
0214 tsTextFile.WriteLine strLine
0215 rsTableControl.MoveNext
0216Loop
0217'Write out the in-page Footnotes
0218 Mark_Duplicate_Footnotes (rsTableToRead.Fields(0)) 'Flag duplicate footnotes
0219 strQuery = "SELECT Note_Footnotes.* FROM Note_Footnotes WHERE ((([Note_Footnotes]![Note_ID]) = " & rsTableToRead.Fields(0) & ")) ORDER BY Note_Footnotes!FN_ID;"
0220Set rsNotesLinks = CurrentDb.OpenRecordset(strQuery)
0221If Not rsNotesLinks.EOF Then
0222 rsNotesLinks.MoveFirst
0223 strLine = "|Colour_1|<BR><HR><h3 class = ""Left"">In-Page Footnotes:</h3>"
0224 Last_Footnote_Bulletted = "Yes"
0225 Do While Not rsNotesLinks.EOF
0226 'Format the in-page Footnotes
0227 If rsNotesLinks(1) = rsNotesLinks(4) Then 'Allow for Duplicate FNs
0228 If Last_Footnote_Bulletted = "Yes" Then
0229 strLine_Break = ""
0230 Else
0231 strLine_Break = "<BR><BR>"
0232 End If
0233 If InStr(Right(Trim(rsNotesLinks.Fields(2).Value), 4), "|") > 0 Then 'Determine if the footnote ends in a bulleted list. If so, don't add line breaks next time ...
0234 Last_Footnote_Bulletted = "Yes"
0235 Else
0236 Last_Footnote_Bulletted = "No"
0237 End If
0238 'Check, and list, Duplicate FNs
0239 strDup_FNs = ""
0240 Set rsFNCheck = CurrentDb.OpenRecordset("SELECT Note_Footnotes.Note_ID, Note_Footnotes.FN_ID, Note_Footnotes.Master_ID FROM Note_Footnotes WHERE (((Note_Footnotes.Note_ID) = " & Note_ID & ") And ((Note_Footnotes.FN_ID) <> [Note_Footnotes]![Master_ID]) And ((Note_Footnotes.Master_ID) = " & rsNotesLinks(1) & ")) ORDER BY Note_Footnotes.FN_ID;")
0241 If Not rsFNCheck.EOF Then
0242 rsFNCheck.MoveFirst
0243 Do While Not rsFNCheck.EOF
0244 strDup_FNs = strDup_FNs & "<A HREF=""#On-Page_Return_" & rsTableToRead.Fields(0) & "_" & rsFNCheck.Fields(1).Value & """>, " & rsFNCheck.Fields(1).Value & "</A>"
0245 rsFNCheck.MoveNext
0246 Loop
0247 End If
0248 Set rsFNCheck = Nothing
0249 strLine = strLine & "<a name=""On-Page_Link_" & rsTableToRead.Fields(0) & "_" & rsNotesLinks.Fields(1).Value & """></A>" & strLine_Break & "<U><A HREF=""#On-Page_Return_" & rsTableToRead.Fields(0) & "_" & rsNotesLinks.Fields(1).Value & """>" & "<B>Footnote" & IIf(strDup_FNs = "", " ", "s ") & rsNotesLinks.Fields(1).Value & "</A>" & strDup_FNs & "</B></U>: " & rsNotesLinks.Fields(2).Value
0250 End If
0251 rsNotesLinks.MoveNext
0252 Loop
0253 strLine = strLine & "</center><br>"
0254 strLine = Remove_Dummy_Ref(strLine)
0255 strLine = WebEncode(strLine)
0256 strLine = ImageRef(strLine, "Notes", "N", Note_ID, 0)
0257 OK = Reference_Books(strLine, "N", Note_ID, 0)
0258 OK = Reference_Author(strLine, "N", Note_ID, 0) 'Replace the Author References by hyperlinks
0259 OK = Reference_Note_Links(strLine, "N", Note_ID, 0) 'Replace the Note_Link References by hyperlinks
0260 OK = Reference_Reference(strLine)
0261 OK = Reference_Papers(strLine, "N", Note_ID, 0)
0262 OK = Reference_Notes(strLine, "N", Note_ID, 0)
0263 OK = Reference_Code(strLine)
0264 OK = Reference_Code_Bridge(strLine)
0265 OK = Reference_Tables(strLine) 'Replace Table-references by hyperlinks
0266 OK = Reference_Queries(strLine) 'Replace Query-references by hyperlinks
0267 OK = Reference_Webrefs(strLine, "N", Note_ID, 0)
0268 strLine = NumberedBullets(strLine)
0269 strLine = Bullets(strLine)
0270 OK = Mark_Colours(strLine)
0271 OK = Classification_Change(strLine)
0272 tsTextFile.WriteLine strLine
0273End If
0274Set rsNotesLinks = Nothing
0275'Output the links to printable versions
0276If InStr(rsTableToRead.Fields(2), "<B>Printable Version</B>:") = 0 And InStr(rsTableToRead.Fields(2), "<B>Printable Versions</B>:") = 0 Then 'ie. not already a manually-created link to printable versions
0277 strControlQuery = "Select Notes_To_Print.* FROM Notes_To_Print WHERE (Notes_To_Print.Note_ID = " & rsTableToRead.Fields(0) & " AND Notes_To_Print.Current=True) ORDER BY Notes_To_Print.Max_Depth;"
0278 Set rsNotesLinks = CurrentDb.OpenRecordset(strControlQuery) 'Just use this recordset (even though we're not "doing" NotesLinks)!
0279 If Not rsNotesLinks.EOF Then
0280 strPrefix = ""
0281 rsNotesLinks.MoveFirst
0282 strLine = "<a name=""TableOfPrintableVersions""></a><br><hr><h3 class = ""Left"">Printable Version:</h3> <UL><li>Follow "
0283 strMulti_Prints = "No"
0284 Do While Not rsNotesLinks.EOF
0285 'Write out each link in one bulletted string
0286 'But print the Note
0287 strPrintDuplicateFootnoteRefs = rsNotesLinks.Fields(4) & ""
0288 strPrintReadingLists = rsNotesLinks.Fields(3) & ""
0289 OK = NoteForPrinting(rsTableToRead.Fields(0), rsNotesLinks.Fields(1), rsNotesLinks.Fields(2), IIf(Notes_Group_Name = "Supervisions", 10, 0), Last_Changed_Timestamp, "")
0290 strLine = strLine & strPrefix & "(<A Href=""Notes_Print/NotesPrint_" & rsTableToRead.Fields(0) & "_" & rsNotesLinks.Fields(1) & IIf(rsNotesLinks.Fields(2) & "" = "Yes", "_P", "") & IIf(strPrintReadingLists = "Yes", "_R", "") & IIf(strPrintDuplicateFootnoteRefs = "Yes", "_D", "") & ".htm"" TARGET = ""_top"">this link</A>) for level " & rsNotesLinks.Fields(1).Value & IIf(strPrintReadingLists = "Yes", IIf(strPrintDuplicateFootnoteRefs = "Yes", " (with reading list and duplicate footnotes indicated)", " (with reading list)"), IIf(strPrintDuplicateFootnoteRefs = "Yes", " (with duplicate footnotes indicated)", ""))
0291 rsNotesLinks.MoveNext
0292 If rsNotesLinks.EOF Then
0293 strPrefix = ""
0294 Else
0295 strPrefix = ", and </li><li>Follow "
0296 strMulti_Prints = "Yes"
0297 End If
0298 Loop
0299 strLine = strLine & ".</li></UL>"
0300 If strMulti_Prints = "Yes" Then
0301 strLine = ReplaceCode(strLine, "Printable Version", "Printable Versions")
0302 End If
0303 tsTextFile.WriteLine strLine
0304 End If
0305End If
0306'Table of previous versions
0307Total_Previous = 0
0308If PreviousVersionCount > 12 Then
0309 Total_Previous = PreviousVersionCount
0310 PreviousVersionCount = 12
0311End If
0312If Not rsNotesPreviousLinks.EOF Then
0313 If PreviousVersionCount > 1 Then
0314 strLine = "<BR><HR><h3 class= ""Left"">Table of the Previous " & PreviousVersionCount & " Versions of this Note:" & IIf(Total_Previous = 0, "", " (of " & Total_Previous & ")") & "</h3>"
0315 Else
0316 strLine = "<BR><HR><h3 class= ""Left"">Previous Version of this Note:</h3>"
0317 End If
0318 strLine = "<a name=""TableOfPreviousVersions""></a>" & strLine
0319 tsTextFile.WriteLine strLine
0320 strLine = "<TABLE class = ""ReadingList"" WIDTH=700>"
0321 tsTextFile.WriteLine strLine
0322 strLine = "<TR><TD WIDTH=""20%"" class = ""BridgeCenter""><strong>Date</strong></TD>"
0323 tsTextFile.WriteLine strLine
0324 strLine = "<TD WIDTH=""10%"" class = ""BridgeRight""><strong>Length</strong></TD>"
0325 tsTextFile.WriteLine strLine
0326 strLine = "<TD WIDTH=""70%"" class = ""BridgeLeft""><strong>Title</strong></TD></TR>"
0327 tsTextFile.WriteLine strLine
0328 rsNotesPreviousLinks.MoveFirst
0329 Do While Not (rsNotesPreviousLinks.EOF Or PreviousVersionCount < 1)
0330 PreviousVersionCount = PreviousVersionCount - 1
0331 strLine = "<TR><TD class = ""BridgeCenter"">" & rsNotesPreviousLinks.Fields(3).Value & "</TD>"
0332 tsTextFile.WriteLine strLine
0333 strLine = "<TD class = ""BridgeRight"">" & rsNotesPreviousLinks.Fields(2).Value & "</TD>"
0334 tsTextFile.WriteLine strLine
0335 strLine = "<TD class = ""BridgeLeft""><A HREF = ""Notes_" & rsTableToRead.Fields(0) & "_" & rsNotesPreviousLinks.Fields(0).Value & ".htm"">" & rsNotesPreviousLinks.Fields(1).Value & "</A>" & "</TD></TR>"
0336 tsTextFile.WriteLine strLine
0337 rsNotesPreviousLinks.MoveNext
0338 Loop
0339 strLine = "</TABLE>"
0340 tsTextFile.WriteLine strLine
0341End If
0342Set rsNotesPreviousLinks = Nothing
0343If Note_ID <> 874 Then 'N/A for Test Note
0344 'Footer Table & Headers
0345 strLine = "<a name=""TableOfCategorisedReadingList""></a><BR><HR><BR><CENTER><TABLE class = ""Bridge"" WIDTH=950><TR>"
0346 tsTextFile.WriteLine strLine
0347 strLine = "<TH WIDTH=""25%"">Note last updated</TH>"
0348 tsTextFile.WriteLine strLine
0349 If rsTableToRead.Fields(8).Value = "Yes" Then
0350 strLine = "<TH WIDTH=""50%"">Reading List for this Topic</TH>"
0351 tsTextFile.WriteLine strLine
0352 Else
0353 strLine = "<TH WIDTH=""50%"">Reference for this Topic</TH>"
0354 tsTextFile.WriteLine strLine
0355 End If
0356 strLine = "<TH WIDTH=""25%"">Parent Topic</TH></TR>"
0357 tsTextFile.WriteLine strLine
0358 'Last updated Footer
0359 If (rsTableToRead.Fields(11) & "") = "Temp" Then
0360 DatePrint = Now()
0361 Else
0362 DatePrint = Val(rsTableToRead.Fields(6) & "") / 1000
0363 End If
0364 strLine = "<TR><TD WIDTH=""25%"">" & DatePrint & "</TD>"
0365 tsTextFile.WriteLine strLine
0366 'Reading-List Footer
0367 If rsTableToRead.Fields(8).Value = "Yes" Then
0368 strControlQuery = "SELECT [Identity Papers - Abstracts - Full - SubTopic (Titles)].ID, [Identity Papers - Abstracts - Full - SubTopic (Titles)].[Sub-Topic] FROM Notes INNER JOIN [Identity Papers - Abstracts - Full - SubTopic (Titles)] ON Notes.Item_Title = [Identity Papers - Abstracts - Full - SubTopic (Titles)].[Sub-Topic] WHERE (((Notes.ID)=" & rsTableToRead.Fields(0) & "));"
0369 Set rsNotesLinks = CurrentDb.OpenRecordset(strControlQuery)
0370 If Not rsNotesLinks.EOF Then
0371 rsNotesLinks.MoveFirst
0372 strLine = "<A HREF = ""../../PaperCatalogIdentityFullSubTopic_" & rsNotesLinks.Fields(0) & ".htm"" TARGET = ""_top"">" & rsTableToRead.Fields(1) & "</A>"
0373 strLine = "<TD WIDTH=""50%"">" & strLine & "</TD>"
0374 Else
0375 strLine = "<TD WIDTH=""50%"">None available</TD>"
0376 End If
0377 tsTextFile.WriteLine strLine
0378 Else
0379 strLine = "<TD WIDTH=""50%"">" & rsTableToRead.Fields(0).Value & " (" & rsTableToRead.Fields(1).Value & ")</TD>"
0380 tsTextFile.WriteLine strLine
0381 End If
0382 'Parent Topic Footer
0383 strLine = "<TD WIDTH=""25%"">" & rsTableToRead.Fields(5) & "</TD></TR>"
0384 tsTextFile.WriteLine strLine
0385 strLine = "</TABLE></center><br>"
0386 tsTextFile.WriteLine strLine
0387End If
0388'Links Out Footer
0389strNotesTitle_Saved = ""
0390iNotes_Title_Index = 1
0391 strControlQuery = "SELECT Cross_Reference.Called_ID, 0 AS Called_Ref, Notes.Item_Title, Notes_1.Note_Group, Notes.Note_Group, Note_Qualities.Note_Quality_Text, Note_Qualities.Note_Quality_Colour FROM ((Cross_Reference INNER JOIN Notes ON Cross_Reference.Called_ID = Notes.ID) INNER JOIN Notes AS Notes_1 ON Cross_Reference.Calling_ID = Notes_1.ID) LEFT JOIN Note_Qualities ON Notes.Note_Quality = Note_Qualities.Note_Quality WHERE (((Cross_Reference.Calling_ID) = " & rsTableToRead.Fields(0) & ") And ((Cross_Reference.Calling_Type) = ""N"") And ((Cross_Reference.Called_Type) = ""N"") And ((Cross_Reference.Calling_Timestamp) = 0) And ((Cross_Reference.Called_Timestamp) = 0)) GROUP BY Cross_Reference.Called_ID, 0, Notes.Item_Title, Notes_1.Note_Group, Notes.Note_Group, Note_Qualities.Note_Quality_Text, Note_Qualities.Note_Quality_Colour ORDER BY Notes.Item_Title;"
0392Set rsNotesLinks = CurrentDb.OpenRecordset(strControlQuery)
0393If Not rsNotesLinks.EOF Then
0394 strLine = "<a name=""TableOfLinksOut""></a><hr><h3>Summary of Notes Referenced by This Note</h3>"
0395 tsTextFile.WriteLine strLine
0396 'Title-based jump table
0397 ' ... Header
0398 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = ""Jump_Table_Titles"") And ((Website_Control.Section) = ""Header"")) ORDER BY Website_Control.Line;"
0399 Set rsTableControl2 = CurrentDb.OpenRecordset(strControlQuery)
0400 rsTableControl2.MoveFirst
0401 Do While Not rsTableControl2.EOF
0402 strLine = rsTableControl2.Fields(0) & ""
0403 tsTextFile.WriteLine strLine
0404 rsTableControl2.MoveNext
0405 Loop
0406 ' ... Rows
0407 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = ""Jump_Table_Titles"") And ((Website_Control.Section) = ""Rows"")) ORDER BY Website_Control.Line;"
0408 Set rsTableControl2 = CurrentDb.OpenRecordset(strControlQuery)
0409 rsTableControl2.MoveFirst
0410 rsNotesLinks.MoveFirst
0411 Do While (Not rsTableControl2.EOF Or Not rsNotesLinks.EOF)
0412 If rsTableControl2.EOF Then
0413 rsTableControl2.MoveFirst
0414 End If
0415 strLine = rsTableControl2.Fields(0) & ""
0416 x = InStr(1, strLine, "**Column")
0417 If x > 0 Then
0418 z = 0
0419 If Not rsNotesLinks.EOF Then
0420 If rsNotesLinks.Fields(2) = strNotesTitle_Saved Then
0421 iNotes_Title_Index = iNotes_Title_Index + 1
0422 Else
0423 iNotes_Title_Index = 1
0424 strNotesTitle_Saved = rsNotesLinks.Fields(2)
0425 End If
0426 'Find latest Timestamp for links
0427 FootNoteTimestamp = 0
0428 'Determine if across secure area
0429 strDirectory = ""
0430 If rsNotesLinks.Fields(4) <> 10 Then
0431 strDirectory = "../../Notes/"
0432 Else
0433 strDirectory = "../../Secure_Jen/"
0434 End If
0435 strColoured_Note = rsNotesLinks.Fields(2)
0436 strColour = rsNotesLinks.Fields(6) & ""
0437 If strColour <> "" Then
0438 strColour = " bgcolor=""#" & strColour & """"
0439 z = Len(strColour)
0440 strLine = Replace(strLine, "<td", "<td" & strColour)
0441 strColoured_Note = "<span title=""" & rsNotesLinks.Fields(5) & """>" & strColoured_Note & "</span>" 'Need to add pop-up
0442 End If
0443 Y = "<A href = """ & strDirectory & "Notes_" & Find_New_Directory(rsNotesLinks.Fields(0).Value) & "/Notes_" & rsNotesLinks.Fields(0) & IIf(FootNoteTimestamp > 0, "_" & FootNoteTimestamp, "") & ".htm" & IIf(rsNotesLinks.Fields(1) <> 0, "#" & rsNotesLinks.Fields(1), "") & """>" & strColoured_Note & IIf(iNotes_Title_Index > 1, " (" & iNotes_Title_Index & ")", "") & "</A>"
0444 Else
0445 Y = "&nbsp;"
0446 End If
0447 strLine = Left(strLine, x + z - 1) & Y & Mid(strLine, x + z + 10, Len(strLine))
0448 If Not rsNotesLinks.EOF Then
0449 rsNotesLinks.MoveNext
0450 End If
0451 tsTextFile.WriteLine strLine
0452 Else
0453 tsTextFile.WriteLine strLine
0454 End If
0455 rsTableControl2.MoveNext
0456 Loop
0457 ' ... Footer
0458 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = ""Jump_Table_Titles"") And ((Website_Control.Section) = ""Footer"")) ORDER BY Website_Control.Line;"
0459 Set rsTableControl2 = CurrentDb.OpenRecordset(strControlQuery)
0460 rsTableControl2.MoveFirst
0461 Do While Not rsTableControl2.EOF
0462 strLine = rsTableControl2.Fields(0) & ""
0463 tsTextFile.WriteLine Replace(strLine, " (if any)", "")
0464 rsTableControl2.MoveNext
0465 Loop
0466End If
0467If Note_ID <> 874 Then 'N/A for Test Note
0468 'Notes Links In Footer
0469 strNotesTitle_Saved = ""
0470 iNotes_Title_Index = 1
0471 strControlQuery = "SELECT Cross_Reference.Calling_ID, Cross_Reference.Calling_NameRef, Notes.Item_Title, Notes.Note_Group, Notes_1.Note_Group, Note_Qualities.Note_Quality_Text, Note_Qualities.Note_Quality_Colour FROM ((Cross_Reference INNER JOIN Notes ON Cross_Reference.Calling_ID = Notes.ID) INNER JOIN Notes AS Notes_1 ON Cross_Reference.Called_ID = Notes_1.ID) LEFT JOIN Note_Qualities ON Notes.Note_Quality = Note_Qualities.Note_Quality WHERE (((Cross_Reference.Calling_ID)<>[Called_ID]) And ((Cross_Reference.Called_ID) = " & rsTableToRead.Fields(0) & ") And ((Cross_Reference.Calling_Type) = ""N"") And ((Cross_Reference.Called_Type) = ""N"") And ((Cross_Reference.Calling_Timestamp) = 0) And ((Cross_Reference.Called_Timestamp) = 0)) ORDER BY Notes.Item_Title, Cross_Reference.Calling_NameRef;"
0472 Set rsNotesLinks = CurrentDb.OpenRecordset(strControlQuery)
0473 If Not rsNotesLinks.EOF Then
0474 strLine = "<a name=""TableOfLinksIn""></a><BR><HR><BR><h3>Summary of Notes Citing This Note</h3>"
0475 tsTextFile.WriteLine strLine
0476 'Title-based jump table
0477 ' ... Header
0478 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = ""Jump_Table_Titles"") And ((Website_Control.Section) = ""Header"")) ORDER BY Website_Control.Line;"
0479 Set rsTableControl2 = CurrentDb.OpenRecordset(strControlQuery)
0480 rsTableControl2.MoveFirst
0481 Do While Not rsTableControl2.EOF
0482 strLine = rsTableControl2.Fields(0) & ""
0483 tsTextFile.WriteLine strLine
0484 rsTableControl2.MoveNext
0485 Loop
0486 ' ... Rows
0487 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = ""Jump_Table_Titles"") And ((Website_Control.Section) = ""Rows"")) ORDER BY Website_Control.Line;"
0488 Set rsTableControl2 = CurrentDb.OpenRecordset(strControlQuery)
0489 rsTableControl2.MoveFirst
0490 rsNotesLinks.MoveFirst
0491 Do While (Not rsTableControl2.EOF Or Not rsNotesLinks.EOF)
0492 If rsTableControl2.EOF Then
0493 rsTableControl2.MoveFirst
0494 End If
0495 strLine = rsTableControl2.Fields(0) & ""
0496 x = InStr(1, strLine, "**Column")
0497 If x > 0 Then
0498 z = 0
0499 iNotes_Title_Index = 1
0500 If Not rsNotesLinks.EOF Then
0501 NameRef = "#N" & Note_ID & "_" & rsNotesLinks.Fields(1)
0502 'Determine if across secure area
0503 strDirectory = ""
0504 If rsNotesLinks.Fields(3) <> 10 Then
0505 strDirectory = "../../Notes/"
0506 Else
0507 strDirectory = "../../Secure_Jen/"
0508 End If
0509 strColoured_Note = rsNotesLinks.Fields(2)
0510 strColour = rsNotesLinks.Fields(6) & ""
0511 If strColour <> "" Then
0512 strColour = " bgcolor=""#" & strColour & """"
0513 z = Len(strColour)
0514 strLine = Replace(strLine, "<td", "<td" & strColour)
0515 strColoured_Note = "<span title=""" & rsNotesLinks.Fields(5) & """>" & strColoured_Note & "</span>" 'Need to add pop-up
0516 End If
0517 Y = "<A href = """ & strDirectory & "Notes_" & Find_New_Directory(rsNotesLinks.Fields(0).Value) & "/Notes_" & rsNotesLinks.Fields(0) & IIf(FootNoteTimestamp > 0, "_" & FootNoteTimestamp, "") & ".htm" & NameRef & """>" & strColoured_Note & IIf(iNotes_Title_Index > 1, " (" & iNotes_Title_Index & ")", "") & "</A>"
0518 'Repeat citings
0519 strNotesTitle_Saved = rsNotesLinks.Fields(2)
0520 Done = "No"
0521 i = 1
0522 Do Until Done = "Yes"
0523 NameRef = "#N" & Note_ID & "_" & rsNotesLinks.Fields(1)
0524 rsNotesLinks.MoveNext
0525 If rsNotesLinks.EOF Then
0526 rsNotesLinks.MovePrevious
0527 Done = "Yes"
0528 Else
0529 If (strNotesTitle_Saved = rsNotesLinks.Fields(2).Value) Then
0530 iNotes_Title_Index = iNotes_Title_Index + 1
0531 i = i + 1
0532 If Y <> "" Then
0533 Y = Y & ", "
0534 End If
0535 'Determine if across secure area
0536 strDirectory = ""
0537 If rsNotesLinks.Fields(3) <> 10 Then
0538 strDirectory = "../../Notes/"
0539 Else
0540 strDirectory = "../../Secure_Jen/"
0541 End If
0542 Y = Y & "<A href = """ & strDirectory & "Notes_" & Find_New_Directory(rsNotesLinks.Fields(0).Value) & "/Notes_" & rsNotesLinks.Fields(0) & IIf(FootNoteTimestamp > 0, "_" & FootNoteTimestamp, "") & ".htm" & NameRef & """>" & IIf(iNotes_Title_Index > 1, iNotes_Title_Index, "") & "</A>"
0543 Else
0544 rsNotesLinks.MovePrevious
0545 Done = "Yes"
0546 End If
0547 End If
0548 Loop
0549 FootNoteTimestamp = 0
0550 Else
0551 Y = "&nbsp;"
0552 End If
0553 strLine = Left(strLine, x + z - 1) & Y & Mid(strLine, x + z + 10, Len(strLine))
0554 If Not rsNotesLinks.EOF Then
0555 rsNotesLinks.MoveNext
0556 End If
0557 tsTextFile.WriteLine strLine
0558 Else
0559 tsTextFile.WriteLine strLine
0560 End If
0561 rsTableControl2.MoveNext
0562 Loop
0563 ' ... Footer
0564 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = ""Jump_Table_Titles"") And ((Website_Control.Section) = ""Footer"")) ORDER BY Website_Control.Line;"
0565 Set rsTableControl2 = CurrentDb.OpenRecordset(strControlQuery)
0566 rsTableControl2.MoveFirst
0567 Do While Not rsTableControl2.EOF
0568 strLine = rsTableControl2.Fields(0) & ""
0569 tsTextFile.WriteLine Replace(strLine, " (if any)", "")
0570 rsTableControl2.MoveNext
0571 Loop
0572 End If
0573 'Add the list of Authors, Books & Papers referencing this Note
0574 strLine = "<a name=""TableOfCitations""></a>"
0575 tsTextFile.WriteLine strLine
0576 OK = AddCitations_List("Note", rsTableToRead.Fields(0), tsTextFile, "Non-Print")
0577 'Add the Reading List - note - need to populate Note_Usage_Temp first
0578 ' ... Only if this Notes_Group has Reading Lists ...
0579 strLine = "Select Note_Groups![ReadingList?] From Note_Groups Where Note_Groups.Note_Group = """ & rsTableToRead.Fields(4) & """;"
0580 Set rsTableControl2 = CurrentDb.OpenRecordset(strLine)
0581 rsTableControl2.MoveFirst
0582 If rsTableControl2.Fields(0).Value = "Yes" Then
0583 'Clear the Notes usage table
0584 DoCmd.RunSQL ("DELETE Note_Usage_Temp.* FROM Note_Usage_Temp;")
0585 'Prepopulate with the main note
0586 strLine = "SELECT Note_Usage_Temp.* FROM Note_Usage_Temp;"
0587 Set rsTableControl2 = CurrentDb.OpenRecordset(strLine)
0588 rsTableControl2.AddNew
0589 rsTableControl2.Fields(0) = rsTableToRead.Fields(0)
0590 rsTableControl2.Fields(1) = "Main Text"
0591 rsTableControl2.Fields(2) = 0
0592 rsTableControl2.Fields(3) = 0
0593 rsTableControl2.Fields(4) = 0
0594 rsTableControl2.Update
0595 strLine = "<a name=""TableOfReferences""></a>"
0596 tsTextFile.WriteLine strLine
0597 OK = AddReading_List(rsTableToRead.Fields(1), tsTextFile, "Non-Print")
0598 End If
0599 'Add Colour Conventions list
0600 strLine = "<a name=""ColourConventions""></a><br><hr><br><h3 class = ""Left"">Text Colour Conventions</h3><OL TYPE=""1"">"
0601 For i = 0 To 19
0602 If Colour_Table(i, 4) = "1" Then
0603 strLine = strLine & "<li><FONT COLOR = """ & Colour_Table(i, 1) & """>" & Colour_Table(i, 2) & "</FONT>: " & Colour_Table(i, 3) & "</li>"
0604 End If
0605 Next i
0606 strLine = strLine & "</OL><BR>"
0607 tsTextFile.WriteLine strLine
0608End If
0609'Note-page Footer
0610strLine = ""
0611 strControlTable = "Notes"
0612 strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""Footer"")) ORDER BY Website_Control.Line;"
0613Set rsFooterControl = CurrentDb.OpenRecordset(strControlQuery)
0614rsFooterControl.MoveFirst
0615Do While Not rsFooterControl.EOF
0616 strLine = strLine & rsFooterControl.Fields(0)
0617 OK = Replace_Timestamp(strLine)
0618 rsFooterControl.MoveNext
0619Loop
0620tsTextFile.WriteLine strLine
0621'Copy to Transfer
0622If (rsTableToRead.Fields(11) & "" <> "Temp") Or ((rsTableToRead.Fields(11) & "" = "Temp") And (rsTableToRead.Fields(13) = True)) Then
0623 If rsTableToRead.Fields(7).Value = "Yes" Then
0624 OK = CopyToTransfer(strFolder, strFileName, "Private")
0625 Else
0626 OK = CopyToTransfer(strFolder, strFileName)
0627 End If
0628End If
0629'Have we just archived this Note? Then we'll need to create its timestamped page
0630If rsTableToRead.Fields(6).Value = Last_Changed_Timestamp Then
0631 If (rsTableToRead.Fields(11) & "") <> "Temp" Then 'Ignore "Immediate promotion" Temp Notes
0632 OK = OutputNotesWebPage_Archived(rsTableToRead.Fields(0))
0633 End If
0634End If
0635'Tidy Up
0636Set rsNotesLinks = Nothing
0637Set rsTableControl = Nothing
0638Set rsTableToRead = Nothing
0639Set fsoTextFile = Nothing
0640End Sub

Procedures Calling This Procedure (OutputNotesWebPage) Procedures Called By This Procedure (OutputNotesWebPage) Tables / Queries / Fragments Directly Used By This Procedure (OutputNotesWebPage) Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page



© Theo Todman, June 2007 - May 2025. Please address any comments on this page to theo@theotodman.com. File output:
Website Maintenance Dashboard
Return to Top of this Page Return to Theo Todman's Philosophy Page Return to Theo Todman's Home Page