Populate an Outlook 2007 template with spreadsheet data.

Status
Not open for further replies.
I need some basic advice about whether this is at all possible, and if so, what it would entail.




I have a form, it spits data to a spreadsheet. (Currently both are hosted on the web, but could both be hosted on local servers.)




I'd like an Outlook template to automagically populate with specific data from the spreadsheet. I'd want to be able to do this once a week with the new information submitted to the spreadsheet.




E.G.




Spreadsheet data:




1. John Accounting I love accounting


2. Sam Warehouse Betty has a new dog


3. Skip Operations I prefer tea, not coffee


4. Joe Accounting I was late to work on Sunday.


5. Sara Operations Red is not my favorite color.






E-mail:




Dear Boss,




Here is what folks had to say about their workgroups:




Accounting



* I love accounting
* I was late to work on Sunday




Operations



* Red is not my favorite color
* I prefer tea, not coffee




Warehouse



* Betty has a new dog.




Is this technically possible? I have beginner's experience with VB, but I'm a very zippy learner. I'm curious right now if this is technically a possibility. If so, can someone point me in the right direction?




Thank you very much for any help, in advance!
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
It's possible.

I'd use a class module as a collection for what the people have ot say:

<workgroup.cls
Public Name$

Private m_Text$

Public Sub AddText(Text$)

m_Text = m_Text & Text & vbcrlf

End Sub

Public Function GetText() as String

GetText=m_Text

End Sub

</workgroup.cls
In another module hold the collection of workgroup objects etc.:

Private m_Workgroups as New VBA.Collection

Public Sub ReadWorksheed()

On Error Resume Next

' open the worksheet, and read its content, that is in a loop walk through

the rows

' then add each row to a workgroup object, for instance read the second

column into the Name variable, and the third into the Text variable

Dim Name$, Text$

Dim wg as workgroup

Do While... ' loop through the rows

Set wg=m_Workgroups(Name)

If Err Then

' That group doesn't exist yet

Err.Clear

Set wg=New Workgroup

wg.Name=Name

wg.AddText Text

m_workgroups.Add wg,Name

Else

wg.AddText Text

Endif

Wend

For reading a worksheet, in Excel see the Workbooks.Open function, the Range

object, and the Range.Offset function.

Best regards

Michael Bauer

Category Manager - Easily share your categories:

SAM - Automatically choose sending account, signature, and sent message

folder:

Am Wed, 26 May 2010 15:12:00 -0400 schrieb Gwendolyn3883:


> I need some basic advice about whether this is at all possible, and if
> so, what it would entail.

> I have a form, it spits data to a spreadsheet. (Currently both are
> hosted on the web, but could both be hosted on local servers.)

> I'd like an Outlook template to automagically populate with specific
> data from the spreadsheet. I'd want to be able to do this once a week
> with the new information submitted to the spreadsheet.

> E.G.

> Spreadsheet data:

> 1. John Accounting I love accounting
> 2. Sam Warehouse Betty has a new dog
> 3. Skip Operations I prefer tea, not coffee
> 4. Joe Accounting I was late to work on Sunday.
> 5. Sara Operations Red is not my favorite color.

> E-mail:

> Dear Boss,

> Here is what folks had to say about their workgroups:

> Accounting

> * I love accounting
> * I was late to work on Sunday

> Operations

> * Red is not my favorite color
> * I prefer tea, not coffee

> Warehouse

> * Betty has a new dog.

> Is this technically possible? I have beginner's experience with VB, but
> I'm a very zippy learner. I'm curious right now if this is technically a
> possibility. If so, can someone point me in the right direction?

> Thank you very much for any help, in advance!

> ----------------------------------------------------------------------> ?t=45790

> https://forums.slipstick.com
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
S Pre populate subject + body + attachment to already open email in outlook 2007 Using Outlook 2
C Custom Outlook Form - Populate Information from Radio Button / Check Box Using Outlook 0
Diane Poremsky Outlook VBA: Use a Text File to Populate a ListBox New Slipstick.com Articles 0
A Populate Excel from Outlook Userform Outlook VBA and Custom Forms 3
J populate word template from Outlook custom form Outlook VBA and Custom Forms 2
C Trying to populate an appointment ComboBox from Excel Outlook VBA and Custom Forms 2
A Populate Listbox from Txt File Outlook VBA and Custom Forms 0
A Populate Textbox from Txt File Outlook VBA and Custom Forms 1
M Adding Macro to populate "to" "subject" "body" not deleting email string below. Outlook VBA and Custom Forms 5
T populate calendar with appointments and send reminders Using Outlook 1
J Live Meeting Location populate from body Outlook VBA and Custom Forms 4
A How can I populate a dropdown list? BCM (Business Contact Manager) 4
rohit I want to Populate Popup box while sending any email with attachment. Outlook VBA and Custom Forms 4
rohit I want to Populate Popup box while sending any email with attachment Using Outlook 1
A Cannot populate IMAP folders Using Outlook 1
S Populate textbox values from one form to another form. Using Outlook 0
B Auto Populate From Field Using Outlook 3
R Populate Form with appointments from Calendar Outlook VBA and Custom Forms 1
G Populate BCC field with all Contacts within a Contact Folder Outlook VBA and Custom Forms 4
M Create new Contacts folder and populate it from Access Outlook VBA and Custom Forms 1
A Macro - Open new message, populate from and subject fields, and message text Outlook VBA and Custom Forms 1
G Macro: Create New Message and Auto populate To Field Outlook VBA and Custom Forms 5
S populate body with Word data Outlook VBA and Custom Forms 7
L how to populate multiple users contacts Outlook VBA and Custom Forms 9
A Populate task field based on value of other field Outlook VBA and Custom Forms 9
V Outlook behaving oddly Using Outlook 2
M HTML email signature in Outlook Using Outlook 1
C What folders are needed when reinstalling Outlook 2010 Using Outlook 0
M Respond to Outlook Email Outlook VBA and Custom Forms 0
P Color Code or highlight folders in Outlook 2016 Using Outlook 2
U Outlook locking up when replying to Email Using Outlook 7
J Outlook Autocomplete (Recipients) opens upward Using Outlook 2
A "Get Add-Ins" - Which Version of Outlook to use Using Outlook 1
O Newbie question: how to sync two Outlook -Exchange and IMAP- calendars? Using Outlook 4
P Syncing Outlook & iPhone Calendars Using Outlook 4
S Unable to extract text from an Outlook email message Using Outlook 2
O Outlook on Android: after sharing / sending a news article, draft remains open. Why? Using Outlook 1
T Outlook creates a copie of every mail I send Using Outlook.com accounts in Outlook 4
O Outlook - hidden contacts? Using Outlook 2
F Outlook 365 is "Possessed" Using Outlook 2
e_a_g_l_e_p_i Can someone explain syncing with Outlook and Gmail Using Outlook 3
K Outlook Office 365 VBA download attachment Outlook VBA and Custom Forms 2
e_a_g_l_e_p_i Gmail in Outlook 2010 preview issue Using Outlook 4
I Outlook is stuck at "Updating Calendar" Using Outlook 1
AmonRa Outlook 365 calendar - too much white space Using Outlook 0
e_a_g_l_e_p_i Outlook 2010 Help setting up Gmail account in Outlook 2010 Using Outlook 3
C-S-R How to clear an Outlook (To Do) Task Flag? Using Outlook 8
N How do I make Outlook autocomplete addresses from a list of recognised <full_names> only? Using Outlook 2
P Outlook 2019 UI changes after 20H2 update Using Outlook 1
R How to restrict GWSMO sync to Outlook Send/Receive cycles Using Outlook 0

Similar threads

Top