Print Preview ActiveX Active Users: 76 / Visits Today: 253
Highest Active Users: 99
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Help file
 AddFirstPage - Method
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic: RecordSetReport - Method Topic Next Topic: About - Method  

emiel
Administrator

Belgium
327 Posts

Posted - 07/14/2005 :  10:38:39  Show Profile
Method AddFirstPage

Action:

This methods creates the first page in a document.

Syntax:

AddFirstPage (vMarginLeft As Variant, vMarginRight As Variant , vMarginTop As Variant, vMarginBottom As Variant , vHeaderSize As Variant, vFooterSize As Variant)
Parameter        Description           
  • 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 frame
    Each 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).

    Remarks:

    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.

    Example:

    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, ,500
    See 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 :
    www.immoassist.com
    www.ppreview.net
    www.vbdiamond.com
    www.d2dsources.com
    www.mandix.com

    Edited by - emiel on 06/15/2006 14:30:37
    Go to Bottom of Page
      Previous Topic: RecordSetReport - Method Topic Next Topic: About - Method  
     New Topic  Topic Locked
     Printer Friendly
    Jump To:
    Print Preview ActiveX © Mandix Go To Top Of Page
    This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.02