DavidBaron
September 22, 2004, 19:27:17
Hi There,
I am using the ASP server version to dynamically build employee resumes out of our HR system. So far, so good, but now I have a problem with headers and footers. First off, I am trying to include a header and footer on each page. Basic stuff, like date, title and page in the header, and 'proprietary disclaimer' in the footer. Should be easy I would think. I have written the code, as best I can tell it should work, but nothing comes out. The rest of the resume works fine. Here is some code:
'all variables have already been dim'd
set lc = Server.CreateObject("TIS.TX.LicManager")
set tx = Server.CreateObject("TIS.TX.TextControl")
tx.EnableAutomationServer
twipInch = 1440
tx.FontName = "Arial"
tx.FontSize = "9"
tx.PageMarginT = .75 * twipInch
tx.PageMarginB = .75 * twipInch
tx.PageMarginR = .75 * twipInch
tx.PageMarginL = .75 * twipInch
tx.PageHeight = 11 * twipInch
tx.PageWidth = 8.5 * twipInch
tx.formatSelection = true
tx.HeaderFooter = 5 '1 for header plus 4 for footer
tx.selstart = -1
tx.HeaderFooterSelect 1 'txHeader
ClearTabs tx 'sub routine that gets rid of all tabs
tx.tabcurrent = 1
tx.tabPos = (tx.pagewidth - (tx.pageMarginL + tx.pageMarginR)) / 2
tx.tabtype = 3 'centered
tx.tabcurrent = 2
tx.tabPos = (tx.pagewidth - (tx.pageMarginL + 10)) 'twips
tx.tabType = 2 'right
tx.Text = formatdatetime(now,vbLongdate) & vbTab & "Talent Management Biography" & vbTab & "Page 1"
tx.HeaderFooterSelect 4 'txFooter
ClearTabs tx 'sub routine that gets rid of all tabs
tx.tabcurrent = 1
tx.tabPos = (tx.pagewidth - (tx.pageMarginL + tx.pageMarginR)) / 2
tx.tabtype = 3 'centered
tx.Text = vbTab & "Lockheed Martin Proprietary Information"
tx.HeaderFooterSelect 0
'then go on to create the rest of the resume document, which works great
So, my questions are: Should the above code correct? Nothing comes out anywhere.
Second question: Do I 'set' the header and footer just once, and then it comes out 'by itself' on every page? Or do I have to somehow manually put it on every page? I would imagine the former.
Also, how do I get 'rolling page numbers' to display in a header or footer? Is there some kind of special character?
Thanks,
-David
I am using the ASP server version to dynamically build employee resumes out of our HR system. So far, so good, but now I have a problem with headers and footers. First off, I am trying to include a header and footer on each page. Basic stuff, like date, title and page in the header, and 'proprietary disclaimer' in the footer. Should be easy I would think. I have written the code, as best I can tell it should work, but nothing comes out. The rest of the resume works fine. Here is some code:
'all variables have already been dim'd
set lc = Server.CreateObject("TIS.TX.LicManager")
set tx = Server.CreateObject("TIS.TX.TextControl")
tx.EnableAutomationServer
twipInch = 1440
tx.FontName = "Arial"
tx.FontSize = "9"
tx.PageMarginT = .75 * twipInch
tx.PageMarginB = .75 * twipInch
tx.PageMarginR = .75 * twipInch
tx.PageMarginL = .75 * twipInch
tx.PageHeight = 11 * twipInch
tx.PageWidth = 8.5 * twipInch
tx.formatSelection = true
tx.HeaderFooter = 5 '1 for header plus 4 for footer
tx.selstart = -1
tx.HeaderFooterSelect 1 'txHeader
ClearTabs tx 'sub routine that gets rid of all tabs
tx.tabcurrent = 1
tx.tabPos = (tx.pagewidth - (tx.pageMarginL + tx.pageMarginR)) / 2
tx.tabtype = 3 'centered
tx.tabcurrent = 2
tx.tabPos = (tx.pagewidth - (tx.pageMarginL + 10)) 'twips
tx.tabType = 2 'right
tx.Text = formatdatetime(now,vbLongdate) & vbTab & "Talent Management Biography" & vbTab & "Page 1"
tx.HeaderFooterSelect 4 'txFooter
ClearTabs tx 'sub routine that gets rid of all tabs
tx.tabcurrent = 1
tx.tabPos = (tx.pagewidth - (tx.pageMarginL + tx.pageMarginR)) / 2
tx.tabtype = 3 'centered
tx.Text = vbTab & "Lockheed Martin Proprietary Information"
tx.HeaderFooterSelect 0
'then go on to create the rest of the resume document, which works great
So, my questions are: Should the above code correct? Nothing comes out anywhere.
Second question: Do I 'set' the header and footer just once, and then it comes out 'by itself' on every page? Or do I have to somehow manually put it on every page? I would imagine the former.
Also, how do I get 'rolling page numbers' to display in a header or footer? Is there some kind of special character?
Thanks,
-David