Results 1 to 10 of 10

Thread: Quotes 'n' Schtuffs

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16
    How do I display a quote?
    Everytime I've tried, I've terminated the openquote too early or commented out the closequote. 8)

    Full Contact Coding-
    The greatest way of life!

  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Use either 2 quote marks together or Chr$(34). I.E.:
    Msgbox """"
    - or -
    Msgbox Chr$(34)
    "It's cold gin time again ..."

    Check out my website here.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16

    How about?

    Thanks! One more question: How do I take text from a textbox and insert it into a text file? I've already taken care of the file opening and closing, I just need to know how to append the textbox info into it.
    Full Contact Coding-
    The greatest way of life!

  4. #4
    Guest
    I prefer Chr$(34). """" gets a little too confusing....

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use this:

    Print# 1, Text1.Text
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Guest
    do you want to open it for Append(add to) or Output(overwrite)?


    Code:
    Private Sub Command1_Click()
    
    'append(add to)
      Open "c:\text.txt" For Append As #1
        Print #1, Text1.Text
      Close #1
    
    'output(overwrite)
      Open "c:\text.txt" For Output As #1
        Print #1, Text1.Text
      Close #1
    
    End Sub

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Hehe. You forgot your [ /code ], I think.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    To append text from a textbox to a file, you must use either the Write or the Print statement. Write will enclose the text in quotes, Print will not (you probably want Print).

    Example:
    Code:
    Open "C:\Whatever\MyFile.txt" For Append As #1
    Print #1, txtWhatever.Text
    Close #1
    "It's cold gin time again ..."

    Check out my website here.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16

    Sorry, I'll be more specific...

    Here's what I'm working with.

    Code:
    Private Sub cmdPlaceorder_Click()
      Dim objSession As Object
      Dim objMessage As Object
      Dim objRecipient As Object
    
    
      'Create the Session Object
      Set objSession = CreateObject("mapi.session")
    
    
      'Logon using the session object
      'Specify a valid profile name if you want to
      'Avoid the logon dialog box
      'objSession.Logon profileName:="MS Exchange Settings"
       objSession.Logon profileName:="Novell Default Settings"
    
      'Add a new message object to the OutBox
      Set objMessage = objSession.Outbox.Messages.Add
    
    
      'Set the properties of the message object
      objMessage.subject = "ECLS Order"
      objMessage.Text = "-----"
    
    
      'Add a recipient object to the objMessage.Recipients collection
      Set objRecipient = objMessage.Recipients.Add
    
    
      'Set the properties of the recipient object
      objRecipient.Name = "[email protected]"  '<---Replace this with a valid
                                      'display name or e-mail alias
      'objRecipient.Type = mapiTo
      objRecipient.Resolve
    
      'Send the message
      objMessage.Send showDialog:=False
      MsgBox "Order placed successfully!"
    
      'Logoff using the session object
      objSession.Logoff
    
    
    End Sub
    On the line that says 'objMessage.Text = "-----"', I could insert the information itself from the textboxes, or I could put a brief message here and add an attachment containing a file with the info. Which would be more efficient, and how would I do it?


    P.S. - Yes, I did get this code from a vb site.
    Full Contact Coding-
    The greatest way of life!

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16

    Sorry, But I raelly need help

    Sorry for bringing this back up in the list, but I really need to figure this out soon!
    Full Contact Coding-
    The greatest way of life!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width