how to control the filename generated by PDFCreator using VB6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mcolorblind
    New Member
    • Sep 2008
    • 2

    #1

    how to control the filename generated by PDFCreator using VB6.0

    I would to ask help from you guys regarding my problem with VB6.0 + PDFCreator. i've been doing VB6.0 for quite some time now but this current project of mine will generate reports in a PDF format and this is my first time with PDF. Here goes: Using my VB Apps, i want to control the filename generated by PDFCreator, which generates ''Microsoft Visual Basic as pdf filename, to the appropriate filename like 'Monthly Sales'. However, if i generate the file into MSWORD and generate PDF from MSWORD, the proper filename will be created by the PDFCreator.

    thank you very much
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    can you please pass more information

    Comment

    • mcolorblind
      New Member
      • Sep 2008
      • 2

      #3
      Originally posted by debasisdas
      can you please pass more information
      thanks debasisdas


      here is my code:

      <<<<<<<<< start of code snipet >>>>>>>>

      Set Printer = Printers(Printe rIndex("PDFCrea tor"))
      Y = 1440 * 0.4 '1440twips equals 1 inch
      bM = (5.5 * 1440 - (1440 * 0.4)) '5.5 * 1440 to get 5.5 inch in twips

      Printer.Font.Na me = "Courier New"
      Printer.Font.Si ze = "9"
      While rs.EOF = False

      Printer.Current Y = Y
      Printer.Current X = 1440 ' left margin at 1 In
      Printer.Print rs!Lines
      Y = Y + 185

      If Left(UCase(rs!L ines), Len("STATUS:")) = UCase("STATUS:" ) Then
      Y = 1440 * 0.4
      Printer.NewPage
      End If
      rs.MoveNext

      Wend

      Printer.EndDoc

      <<<<<<<<< end of code snipet >>>>>>>>

      also, i have configure the PDFCreator to automatically save to my specification any print out.

      Comment

      Working...