How to Attach the File in a Email using VB & Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #31
    Originally posted by ttamilvanan81
    Hai. Thanks for your reply. Am already do that, to Register the COMDLG32.OCX. But i didn't do the Register.
    Am tryed what u said as,

    The add referance box will register your activeX into the list box on the left pane.

    But the Available Reference box list out the control, named

    Microsoft Common Dialog Control6.0 (sp3). Then the Same Error Message occured. Then what to do.

    Did u meant the Add Reference Box (list box) or Available References list Box ?

    If u meant is add Reference Box. Tell me how to pick the add reference box?

    Am waiting for your reply.

    Thanks
    Tamilvanan
    Did you follow these steps ...

    1. Go to the VBA Editor
    2. Go to Tools - Referances - click Browse
    3. Locate the activeX file (comdlg32.ocx)

    Comment

    • ttamilvanan81
      New Member
      • Mar 2007
      • 35

      #32
      Originally posted by mmccarthy
      Did you follow these steps ...

      1. Go to the VBA Editor
      2. Go to Tools - Referances - click Browse
      3. Locate the activeX file (comdlg32.ocx)
      Thanks.
      I already do this steps. But again i have the same problem.

      I don't know why this error could be occured.


      Thanks
      Tamilvanan

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #33
        Originally posted by ttamilvanan81
        Thanks.
        I already do this steps. But again i have the same problem.

        I don't know why this error could be occured.


        Thanks
        Tamilvanan
        I honestly don't know. If the library is ticked in the list of references it should be fine.

        Mary

        Comment

        • ttamilvanan81
          New Member
          • Mar 2007
          • 35

          #34
          Originally posted by mmccarthy
          I honestly don't know. If the library is ticked in the list of references it should be fine.

          Mary
          Fine and Thanks for your replies.
          If you know how to Receive Email using Access and Outlook. The Receive Email will be work as follows.

          On the receiving end, the user receives the email at the Outlook. When they opens the Email, the message box should have a button called “Save to Access”.

          When this button is pressed, a dialog box should pop up where the user can choose a contact name and a job name and click on SAVE

          Here contact name and job name are in the access table fields. We go to select any one contact and any one job for the particular Email. Then the Email details are stored into a Access table.


          If you know this, post me please...

          Thanks
          Tamilvanan

          Comment

          • vijayanstephen
            New Member
            • Aug 2007
            • 2

            #35
            hai

            how to attach the file using the vb.net with code

            Comment

            • GUYV3R
              New Member
              • May 2007
              • 4

              #36
              Originally posted by vijaydiwakar
              try this code
              Code:
               
              Private Sub Form_Load()
              Set OLApp = CreateObject("Outlook.Application")
                      Set MyItem = OLApp.CreateItem(olMailItem)
                      
                      txtInsertFile.Text = "c:\ReadMe.txt"
                      MyItem.To = "xxx@gmail.com"
                      
                      MyItem.Subject = "Attach file"
                      MyItem.Body = "read this file "
                      Set MyAttachments = MyItem.Attachments
                      MyAttachments.Add txtInsertFile.Text
                      MyItem.Send
              End Sub
              Excellent, thanks for this, I have been looking for something like this for a long time.

              I deleted the .text from the txtInsertFile.T ext line and am able to use PDF file formats. Works wonders, will save me so much time.

              Comment

              Working...