SaveDialog1.FileName:='YourFileName'
SaveDialog1.Filter:='File Type (*'+ExtractFileExt(YourFileName)+')|'+'*'+ExtractFileExt(YourFileName);
       if SaveDialog1.Execute then
          begin
            ..........
          end; 
 with printdialog1 do
  begin
    options:=[popagenums,poselection];
    frompage:=1;
    minpage:=1;
    toage:=5;
    maxpage:=5;
  end;
if parintdialog.execute then 
  begin
    with printdialog1 do
      begin
       if printrange=prallpages then
           begin
            start:=MinPage-1;
            stop:=maxpage-1;   
           end  
        else
          if printrange=prselection then
           begin
            start:=10
            stop:=start
           end;
 
      end;
  end;

解决方案 »

  1.   

    SaveDialog1.FileName:='YourFileName'
    SaveDialog1.Filter:='File Type (*'+ExtractFileExt(YourFileName)+')|'+'*'+ExtractFileExt(YourFileName);
           if SaveDialog1.Execute then
              begin
                ..........
              end; 
     with printdialog1 do
      begin
        options:=[popagenums,poselection];
        frompage:=1;
        minpage:=1;
        toage:=5;
        maxpage:=5;
      end;
    if parintdialog.execute then 
      begin
        with printdialog1 do
          begin
           if printrange=prallpages then
               begin
                start:=MinPage-1;
                stop:=maxpage-1;   
               end  
            else
              if printrange=prselection then
               begin
                start:=10
                stop:=start
               end;
     
          end;
      end;
      

  2.   

    if SaveDialog.Execute then
      // do your thingsPrintSetupDialog.Execute
    PrintDialog.Execute
      

  3.   

    if SaveDialog.Execute then
      // do your thingsPrintSetupDialog.Execute
    PrintDialog.Execute
      

  4.   

    if not SaveDialog.Execute then
       exit;
      做你我做的事if not PrintSetupDialog.Execute.execute then
       exit;
     做你我做的事