Results 1 to 3 of 3

Thread: I want to call .rtf or .pdf in vb 6.0

  1. #1
    Join Date
    Mar 2009
    Location
    Ghana
    Posts
    15

    I want to call .rtf or .pdf in vb 6.0

    I will like to call a .rtf in vb 6.0 or a pdf file. i am doing my project work that i need it to call for documentation of the software.

  2. #2
    Join Date
    Mar 2008
    Posts
    258

    Re: I want to call .rtf or .pdf in vb 6.0

    The Rich Text Format (RTF) Specification provides a format for text and graphics interchange that can be used with different output devices, operating environments, and operating systems. Make an RTF file in Wordpad... Just type a few characters then hit save, and use the rich text format. Then, open that file in NOTEPAD. Create a new string variable in your VB program, lets call it strRTFBox.

    Code:
    strRTFBox = (copy the header ONLY from the RTF opened in NOTEPAD here).
    for more info check here:

  3. #3
    Join Date
    Jan 2009
    Posts
    43

    Re: I want to call .rtf or .pdf in vb 6.0

    To open .pdf file in Vb

    Code:
    Option Explicit
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    Const SW_SHOWNORMAL = 1
    
    Private Sub Command1_Click()
    Call launchIt("c:\yourFile.pdf")
    End Sub
    
    Private Sub launchIt(strPathAndFile As String)
        ShellExecute Me.hwnd, vbNullString, strPathAndFile, vbNullString, "C:\", SW_SHOWNORMAL
    End Sub
    Hope this helps.

Similar Threads

  1. Replies: 14
    Last Post: 09-04-2012, 02:49 PM
  2. Replies: 7
    Last Post: 20-03-2012, 07:09 AM
  3. Replies: 6
    Last Post: 28-02-2012, 10:21 PM
  4. Replies: 6
    Last Post: 19-11-2011, 10:25 PM
  5. Replies: 6
    Last Post: 23-10-2011, 08:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,038,249.59002 seconds with 16 queries