4 Replies - 202 Views - Last Post: 19 December 2017 - 02:10 PM Rate Topic: -----

#1 slyfuldragon  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 30
  • Joined: 07-November 10

Assistance with Sending or CC'ing yourself/the user an email - but

Posted 19 December 2017 - 09:35 AM

Looking to get some assistance on when pressing a button, I would like it to send the user (whom has an outlook account) to open outlook with a filled pre-filled body and have the user send themselves the email (for records).

This is what I have so far

Dim Outl As Object
Dim omsg As Object

If CheckBox1.Checked Then
            Outl = CreateObject("Outlook.Application")
            omsg = Outl.CreateItem(0)
            omsg.To = ("[email protected]")
            omsg.subject = "Tool Output Log" & " - v." + Application.ProductVersion
            omsg.body = RichTextBox2.Text
            'set message properties here...'
            omsg.Display(True) 'will display message to user
        End If


of course, I'll be taking it out of checkbox format and into a button push, but I'm trying to get a handle on "omsg.To =" to send it the user of the program themselves.

Is this possible?

This post has been edited by slyfuldragon: 19 December 2017 - 09:35 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Assistance with Sending or CC'ing yourself/the user an email - but

#2 andrewsw  Icon User is offline

  • blow up my boots
  • member icon

Reputation: 6447
  • View blog
  • Posts: 26,070
  • Joined: 12-December 12

Re: Assistance with Sending or CC'ing yourself/the user an email - but

Posted 19 December 2017 - 09:38 AM

There is a To property but also a CC property.
Was This Post Helpful? 0
  • +
  • -

#3 slyfuldragon  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 30
  • Joined: 07-November 10

Re: Assistance with Sending or CC'ing yourself/the user an email - but

Posted 19 December 2017 - 10:08 AM

View Postandrewsw, on 19 December 2017 - 11:38 AM, said:

There is a To property but also a CC property.


Sorry this is my first time digging into email/outlook code for vb.net
Been scouring the search engines to find something that could duplicate the "from" over to the "to" when it launches Outlook or even just to populate the user's email address they set up with Outlook in the "To"

I've only so far seen pre-populated email addresses
[e.g. omsg.To = ("[email protected]') ]

Any documentation or possible insight how I could go about doing this? I'm sure it's something I'm easily overlooking.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • blow up my boots
  • member icon

Reputation: 6447
  • View blog
  • Posts: 26,070
  • Joined: 12-December 12

Re: Assistance with Sending or CC'ing yourself/the user an email - but

Posted 19 December 2017 - 01:02 PM

Search "outlook vba from".

A Sender property appears first, but I have doubts that it will be as easy as just setting this property.
Was This Post Helpful? 1
  • +
  • -

#5 slyfuldragon  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 30
  • Joined: 07-November 10

Re: Assistance with Sending or CC'ing yourself/the user an email - but

Posted 19 December 2017 - 02:10 PM

View Postandrewsw, on 19 December 2017 - 03:02 PM, said:

Search "outlook vba from".

A Sender property appears first, but I have doubts that it will be as easy as just setting this property.


Ah, got it. Thanks a lot!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1