小弟英文不好,没看明白他的帮助,谁有代码贴一些来啊,谢谢

解决方案 »

  1.   

    With fpSpreadPreview1
          .PageViewType = 2
          .PageViewPercentage = 100
          .PageViewType = 2
          .hWndSpread = fpSpread4.hWnd
       End With
      

  2.   

    With Spread
            .PrintHeader = "/c/fz""24""/fn""华文新魏""/fb1订购单" & _
                "/n/fz""10""/fn""宋体""/l客户:" & TexClient.Text & "/c单据编号:" & TexBillNum.Text & "/r打印时间:/date /time" & _
                "/n/l操作员:" & PubStrUserName & "/cPage /p Of /pc/r经手人:___________________"
            .PrintJobName = "订购单"
            .PrintMarginTop = CDbl(MasBoxTop.Text) * 515
            .PrintMarginBottom = CDbl(MasBoxDown.Text) * 515
            .PrintMarginLeft = CDbl(MasBoxLeft.Text) * 515
            .PrintMarginRight = CDbl(MasBoxRight.Text) * 515
            
            If OptVertical.Value = True Then
                .PrintOrientation = PrintOrientationPortrait
            Else
                .PrintOrientation = PrintOrientationLandscape
            End If
            
            If OptAll.Value = True Then           '打印所有
                .PrintType = 0
            ElseIf OptSelect.Value = True Then    '打印所部分
                .Col = .SelBlockCol
                .Col2 = .SelBlockCol2
                .Row = .SelBlockRow
                .Row2 = .SelBlockRow2
                .PrintType = 1
            ElseIf OptCurrently.Value = True Then   '打印当前页
                .PrintType = 2
            ElseIf OptPage.Value = True Then        '打印指定页
                .PrintPageStart = CInt(TxtBPage.Text)
                .PrintPageEnd = CInt(TxtEPage.Text)
                .PrintType = 3
            End If
            SpreadPreview.hWndSpread = .hwnd
        End With