Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Import email text into sql

Posted on 2011-02-15
1
Medium Priority
?
704 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 2000 total points
ID: 34903476
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Mailbox Overload?
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

704 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