Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Customized custftEAI_Standard07.dot footer not checking in documents
AnthonyB7579
Background info: Windows 7, Word 2010, Filesite 8.5 SP2 upd4
I had a programmer create a customized custftEAI_Standard07 to insert doc numbers in my documents. the numbers are created and placed in the document but when you close the Word document, it never checks in. If I close Word and Re-open, the document shows up as a "Recovered Document". The First part of the code works fine. The second part is where the issue starts.
My understanding of the second part of the code is that it checks to see if a 3 column table exist, if it does not then it is to create one and place the "strTextString" in the right column. If it does exist then it should place the "strTextString" in the right column.
The document never checks in as long as the following code is in the custftEAI_Standard07.dot template:
--------------------------------------------------------------------------
' FootActiveDocument is used to put a footer on the active document.
Private Sub FootActiveDocument(ByVal objDocumentToFoot As IManDocument)
Dim strTextString As String
' the text of the footer
Dim strNumber As String
' the number of the document to foot
Dim strVersion As String
' the version number of the document being imported
Dim strDatabase As String
' Get the relevant information about the document.
' The parameter to GetAttributeByID is of type AttributeID; refer to
' the object browser for possible values.
strNumber = objDocumentToFoot.GetAttributeByID(nrDocNum)
strVersion = objDocumentToFoot.GetAttributeByID(nrVersion)
strDatabase = objDocumentToFoot.GetAttributeByID(nrDatabase)
Select Case objDocumentToFoot.GetAttributeByID(nrDatabase)
Case "Walnut"
strDatabase = "WA"
Case "StLouis"
strDatabase = "SL"
Case "Kansas"
strDatabase = "OP"
Case "Omaha"
strDatabase = "OM"
End Select
strTextString = strDatabase + " " + strNumber + "." + strVersion
Dim tableInsertionPoint As range
Dim table As table
Dim pageNumberRange As range
If ActiveDocument.Bookmarks.Exists("FilesiteDocumentString") = False Then
If ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).range.Tables.Count = 0 Then
Set tableInsertionPoint = ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).range
tableInsertionPoint.Start = tableInsertionPoint.End
Set table = ActiveDocument.Tables.Add(tableInsertionPoint, 1, 3)
Else
Set table = ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).range.Tables(ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).range.Tables.Count)
End If
With table.Cell(table.Rows.Count, table.Columns.Count).range
.Font.Size = 8
.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight
End With
ActiveDocument.Bookmarks.Add Name:="FilesiteDocumentString", range:=table.Cell(table.Rows.Count, table.Columns.Count).range
End If
With ActiveDocument.Bookmarks("FilesiteDocumentString").range
.Text = strTextString
End With
If ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).Exists = True Then
If ActiveDocument.Bookmarks.Exists("FirstPageFilesiteDocumentString") = False Then
If ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).range.Tables.Count = 0 Then
Set tableInsertionPoint = ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).range
tableInsertionPoint.Start = tableInsertionPoint.End
Set table = ActiveDocument.Tables.Add(tableInsertionPoint, 1, 3)
Else
Set table = ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).range.Tables(ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).range.Tables.Count)
End If
With table.Cell(table.Rows.Count, table.Columns.Count).range
.Font.Size = 8
.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight
End With
ActiveDocument.Bookmarks.Add Name:="FirstPageFilesiteDocumentString", range:=table.Cell(table.Rows.Count, table.Columns.Count).range
End If
With ActiveDocument.Bookmarks("FirstPageFilesiteDocumentString").range
.Text = strTextString
End With
End If
' --- DEVSUPPORT NOTE: This is added to show page numbers the end-user has entered.
'ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).PageNumbers.ShowFirstPageNumber = True
' --- END DSS NOTE
' With ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage).range
' .Font.Size = 8
' .Text = strTextString 'This is the first page footer
' End With
'End If
End Sub
----------------------------------------------------------
Does anyone see why this code does not let my document check in?
Any help is greatly appreciated.
Ps. I am no Programmer but dealing with this footer issue as made me ore interested in learner more about this stuff.
Anthony
Find more posts tagged with
Comments
There are no comments yet