Posted - 07/14/2005 : 10:38:39
| Method AddFirstPage
This methods creates the first page in a document.
AddFirstPage (vMarginLeft As Variant, vMarginRight As Variant , vMarginTop As Variant, vMarginBottom As Variant , vHeaderSize As Variant, vFooterSize As Variant)
vMarginLeft Size of left margin
vMarginRight Size of right margin
vMarginTop Size of top margin
vMarginBottom Size of bottom margin
vHeaderSize Depth of header frame
vFooterSize Depth of footer frameEach parameter may either be specified as a value, in which case it is taken to be in twips, or as a string like "1 cm" or "1 in".
If a parameter is specified as a string, it is converted using the standard CTwips method, which allows the dimension to be given in string units (cm / in).
A new page is added to the beginning of the document. If the depth of the header is non-zero then a header frame is added, similarly for the footer.
Inside and WholePage frames are also added in every case, with the size of Inside determined as the area inside the margins and the header and footer frames.
If a single page already exists in the document it is deleted and replaced by the newly created page. This method is intended to be used normally to create the first page in a document, and in all other respects acts the same as AddPage. This, therefore, overcomes the difficulty encountered by application programmers migrating from version 4.3, by allowing the creation of a new document (either when Print Preview is first called or after EndDocument) with a single page and no margins.
AddFirstPage is only related to the page, when executed FontName, FontSize and other font related properties are reset to the default values (see General Information), thus they must be set directly, or by a calling a sub, after the code AddFirstPage.
This line of code can also be an ApplyStyle reference.
To add the first page with a footer but no header
Preview.AddFirstPage "1.5 in", "0.5 in", "0.75 in", "0.75 in", , "0.5 in"or directly in twips:
Preview.AddFirstPage 500, 500, 1000, 1000, ,500See Also:
AddPageTemplate --> http://www.ppreview.net/forum/topic.asp?TOPIC_ID=328
AddPage -----------------> http://www.ppreview.net/forum/topic.asp?TOPIC_ID=325
ApplyStyle -> ----------> http://www.ppreview.net/forum/topic.asp?TOPIC_ID=399
Come and visit :
Edited by - emiel on 06/15/2006 14:30:37