Solved

Import email text into sql

Posted on 2011-02-15
1
692 Views
Last Modified: 2012-08-13
Hi experts,
    currently i have macro written in my outlook 2007 that will read the current opening email and formatting then export into an excel file. what i want to do next is besides exporting the information in excel, also insert the same information into sql database.
 
Set strConnection = CreateObject("ADODB.Connection")
strConnection.Open ("Provider=SQLOLEDB;DataSource=internal;Database=Vision;Trusted_Connection=Yes;")
Set rsRecord = CreateObject("ADODB.Recordset")
    rsRecord.Open = "Select * from ReportList"
      rsRecord.Addnew
      rsRecord("ReportHeading") = "PriceList - " & strContact
      rsRecord("EmailName") = strContact
      rsRecord("Email") = strEmail
      rsRecord("Frequency") = strFrequency
      rsRecord("Format") = strType
      rsRecord("OffsetDay") = 0
      rsRecord("SendBlank") = False
      rsRecord("ReportType") = "Pricelist"
      rsRecord("CustomerName") = strCustomerNo

Open in new window


i had these codes, but it went broken at '.Open', so i guess my syntax must went wrong here, anyone could help with this?
0
Comment
Question by:miketonny
1 Comment
 
LVL 16

Accepted Solution

by:
Kalpesh Chhatrala earned 500 total points
ID: 34903476
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Find out what you should include to make the best professional email signature for your organization.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question