Imagine I have a webpage which has standard notes which i copy and paste it to the Microsoft Outlook
by clicking New Mail in the Microsoft Outlook Application. This is a very cumbersome process when we do it on a day to day basis. I thought of an idea of copying all the correspondence (Around 50 Standard notes) to a Excel Spreadsheet and create a macro to open a particular note by click of a button in the Outlook compose box. (Please find the codes at the end of this page). It works fine.
But the problem I am facing is Whenever there is a change done in starndard notes or a new note is added to the webpage, I will have to either update the content in the exsisting cell or add the new note to a unique cell in the excel spreadsheet. Changes done in the website very frequently. I know using the Web Query option and programming in VB this can be done.
I came across this link
which gets all the data from the tables stored in a webpage and exports it to excel. But this code is not complete to work properly.
I need assistance on the Following.
1). to have the code in a running condition.
2). My webpage has many tables (with no labels) of which most of them has stardard notes in it. I want tables containing standard notes be numbered and exported to a single cell (one table content or html codes within the table to be in a single cell, and not spread over multiple cells).
3). if a new table is added to the webpage, Unique number given to all existing tables should not change. If the table number changes, I will not get the note which i want when I click on a specific button.
This is All I want.
Please get back to me if the above notes are not clear.
Code to open notes stored in specific cell in outlook.
CODE STARTS HERE.
Private Sub CommandButton2_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Appl
Set OutMail = OutApp.CreateItem(olMailIt
Dim strbody As String
strbody = "Hi" & vbNewLine & vbNewLine & _
.Range("A2") " I want a specific table contents or codes will be excellent to be exported to this cell, Likewise it will be "A2".."A3" and so on upto 50 notes as I said before so that when I click on a particular button it should open the exact notes in the outlook.
Cell "A2" will look like this <table border ="1"? <tr valign = "top"><td width = 614"><font size = "2" face = "Arial"> Standard notes will start here </td></tr></table>"
.To = "email@example.com"
.CC = ""
.BCC = ""
.Subject = "Notes"
.Body = strbody & vbNewLine & vbNewLine
Set OutMail = Nothing
Set OutApp = Nothing
CODE ENDS HERE.