Solved

Import email text into sql

Posted on 2011-02-15
1
689 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
Comment Utility
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now