473,503 Members | 13,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Alternative to .Send

7 New Member
I have the following code in the OnClick() event of a command button on a form. Right now, it takes the "; " separated values from a TextBox and puts them in the "To:" field of a .oft Outlook Template. It then sends that template out to the appropriate recipients. (exactly what I wanted it to do...)

Problem: My boss is asking for the email template to come up (with the "To:" field populated) but be available to edit before sending.

I would imagine that there's an alternative to the .Send part of this code that will allow me to edit? Any input is greatly appreciated. (If it's complicated, I'll just tell him No - so don't knock yourself out with this one!)

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command87_Click()
  2.  
  3. Dim msgTxt As Variant
  4. Dim objOutlook As Outlook.Application
  5. Dim objMailItem As Outlook.MailItem
  6. Dim blnCreated As Boolean
  7.  
  8.  
  9.  
  10. blnCreated = False
  11.  
  12. Set objOutlook = New Outlook.Application
  13.  
  14. Set objMailItem = objOutlook.CreateItemFromTemplate("\\C:\File\File\xxxx\xxxx\xxxx.oft")
  15.  
  16.  
  17. With objMailItem
  18. .To = Me.Text53
  19. .Send
  20. blnCreated = True
  21. End With
  22.  
  23. End Sub
  24.  
Jun 3 '11 #1
3 2799
ADezii
8,834 Recognized Expert Expert
Replace .Send in Code Line #19 with .Display
Jun 3 '11 #2
NeoPa
32,557 Recognized Expert Moderator MVP
Sometimes we miss the obvious. How about putting the data you want to see/edit in an Access form first then, only after the OK, sending it to Outlook?

That may not suit, and ADezii's probably given a pretty decent alternative anyway, but it's always worth thinking outside the box if you can.
Jun 3 '11 #3
Dave DeSteno
7 New Member
Thank you for the replies. ".Display" was exactly what I wanted. I already had everything in place, but I needed outlook to give me the chance to edit the .oft, and I simply couldn't come up with the command.

It worked beautifully - thank you!

Dave
Jun 20 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
4927
by: Phil W | last post by:
I'm using CDONTS and am trying to send an email out which displays in HTML for HTML-enabled clients, and plain text for non-HTML clients. Unfortunately I am using IIS4 so CDOSYS is not available...
3
2732
by: c# newbie | last post by:
System.Web.Mail.MailFormat The enumerated values for MailFormat are: Html Text How can I send a multipart/alternative format message ?
0
975
by: Bruce Potter | last post by:
Hi, I am trying to send an email with "Content-Type: multipart/alternative;" and mime boundries. I have been able to accomplish this with PHP but I have been unsuccessful with .NET. Is there a...
0
1787
by: jpierson | last post by:
Hi, I'm trying to send commands via send keys these commands have two words for example confreg 0x2142, sendkeys is having a problem with the space between the command it sends it multiple...
15
8563
by: cj | last post by:
How can I get a button in VB to send the contents of a text box via email in a manner similar to the "Send To\Mail Recipient" functionality that you can select via right clicking a file in Windows...
1
6427
by: abilashnn | last post by:
'm attempting to send a mailto: and include a link in the body. Has anyone done this? I have one problem with this. One appln have a link to send an email using “mailto:”. Previosly this...
0
2768
by: sachintandon | last post by:
Hello all, Thanks in advance for your help I have a problem in sending emails, my requirement is to send multipart alternative emails with attachments, I'm able to send text with attachments or...
7
5782
by: Afshar | last post by:
Dear Friends, I want to send email but don't wanna use SmtpClient class, because I want more control on generated mail. Is there any good alternative? Thanks In Advance
4
5037
by: luke noob | last post by:
This is my HTML... <head> <script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script> <script type="text/javascript" src="js/script.js"></script> </head> <body>
1
3378
by: Jason A | last post by:
I need to navigate thru various windows on outside application while populating fields using data stored in Access DB tables I am able to do this via sendkeys but sendkeys is not a long term (or even...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.