Solved

Import email text into sql

Posted on 2011-02-15
1
694 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

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

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Changing a few Outlook Options can help keep you organized!
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 …
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…

710 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