Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IS THERE A PDF CONVERTER FOR VBSCRIPT TO USE IN VB6?? 1

Status
Not open for further replies.

faxpay

Programmer
Nov 30, 2004
119
US
In vb6 I want to convert a text file(assci file) to the pdf format. I need to manipulate and massage the file in vbscript first. Is ther a pdf converter I can use in vb6?

faxpay
Tom
 

I just checked it out - it works pretty slick (with a few easy fixes).


Have fun.

---- Andy
 
I tried using different fonts like Arial Bold and the program ran but when I tried to open up the output PDF it would not open due to errors.

Swi
 
There's a couple other versions out there if you Google for them. I grabbed one a long time ago and don't remember the link but it worked pretty well.

They probably all have little quirks. You get what you pay for :)
 
I'm still trying to figure out if you are interested in VBScript or in VB6
 
strongm,

Do you know of a way to take text from a text file and convert it to a PDF format using VB6. If so, I am very interested. I have the full version of Adobe and someone has written a program that uses the printer object and they are printing the file to a PDF but they would like the promopt not to appear. We really don't want to buy an additional application to do this. Any suggestions?

Swi
 
strongm,

I am in VB6 using vbscript to massage a text file. Then want to convert the text file to a pdf after massaging. Can I do all this from VB6?

Tom

 
Private Sub howtoconvertwordtopdf()
'Option Explicit
' Dim myWord As Word.Application
' Dim myDoc As Word.Document
' Dim OriginalPrinter As String
'
' Set myWord = New Word.Application
'
' Set myDoc = myWord.Documents.Open("your_document_name")
' OriginalPrinter = myWord.ActivePrinter
' myWord.ActivePrinter = "PDFWriter"
' myDoc.PrintOut
' myWord.ActivePrinter = OriginalPrinter
' myDoc.Close (False)
' myWord.Quit
' Set myWord = Nothing



End Sub

'Module for creating PDF file automatically from Crystal Report
Private Sub exporttopdf(repname As String)
' Crystal Report Viwer in the form is made visible enabled and required options set
CRVReport.Visible = True
With crxrpt.ExportOptions
.DestinationType = crEDTDiskFile
.FormatType = crEFTPortableDocFormat
.DiskFileName = App.Path & "\" & repname & ""
End With
On Error GoTo ER
crxrpt.Database.Tables(1).SetLogOnInfo "odbcsource", strDBNameOrPath, strUserID, strPassword
crxrpt.Export False
cmdclose.Visible = True

CRVReport.Top = 20
CRVReport.Left = 20
CRVReport.Height = Me.Height - 1000
CRVReport.Width = Me.Width - 200
cmdclose.Top = CRVReport.Top + CRVReport.Height + 100
cmdpdf.Top = CRVReport.Top + CRVReport.Height + 100
Exit Sub
ER:
MsgBox "Database Busy to access , try some other report and come back"
Exit Sub
End Sub
 
BTW, since this thread has made a reappearance, if you've got Word 2007 (and have got hold of Microsoft's Office 97 SaveAsPDFandXPS addin, which they bizarrely didn't ship on the DVD) it's as simple as:

ActiveDocument.ExportAsFixedFormat OutputFileName:= "<filename>", ExportFormat:=wdExportFormatPDF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top