create an outlook email with objects from MsAccess or oulook with vba

From Office 2010 vba or use .net 2010

I need to know, if its possible to either do 1 of 2 scenarios:

What I need in regards to either scenario:
Build an email message that contains the following objects:
Combobox
textbox
labels

scenario 1 using vba
Build an outlook email from Access :
Open Outlook and create an email message containing the objects

scenario2 using vba
Open outlook silently and create the email message from outlook.

looking for direction and help.


Thanks
fordraiders
LVL 3
FordraidersAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ankit PareekOnline MarketingCommented:
Add a reference to the Outlook object model in the Visual Basic editor. Then you can use the code below to send an email using outlook.

Sub sendOutlookEmail()
Dim oApp As Outlook.Application
Dim oMail As MailItem
Set oApp = CreateObject("Outlook.application")

Set oMail = oApp.CreateItem(olMailItem)
oMail.Body = "Body of the email"
oMail.Subject = "Test Subject"
oMail.To = "Someone@somewhere.com"
oMail.Send
Set oMail = Nothing
Set oApp = Nothing

Open in new window


Add the macro to a toolbar or ribbon button or to the QAT.

Public Sub CreateNewMessage()
Dim objMsg As MailItem
 
Set objMsg = Application.CreateItem(olMailItem)
 
 With objMsg
  .To = "Alias@domain.com"
  .CC= "Alias2@domain.com"
  .BCC = "Alias3@domain.com"
  .Subject = "This is the subject"
  .Categories = "Test"
  .VotingOptions = "Yes;No;Maybe;"
  .BodyFormat = olFormatPlain ' send plain text message
  .Importance = olImportanceHigh
  .Sensitivity = olConfidential
  .Attachments.Add ("path-to-file.docx")
 
' Calculate a date using DateAdd or enter an explicit date
  .ExpiryTime = DateAdd("m", 6, Now) '6 months from now
  .DeferredDeliveryTime = #8/1/2012 6:00:00 PM#
   
  .Display
End With
 
Set objMsg = Nothing
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FordraidersAuthor Commented:
Thanks, I have seen these 2 examples.
None show how to do combobox or textbox.
0
FordraidersAuthor Commented:
was not exactly what I was looking for.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.