Send mail via Outlook

I've written vba code to send mail via Outlook, but when running the code, the code interrupts to prompt the user to choose an Outlook profile.  Is there a way to bypass this prompt, and go with the default profile?Thanks in advance.
0
Phil
3/4/2007 6:09:37 PM
access 16762 articles. 2 followers. Follow

2 Replies
1174 Views

Similar Articles

[PageSpeed] 37

yes there is,  but you might need to paste in the code you use because there is more than 1 way to use outlook and it depend on how you have done it."Phil Hellmuth" <billort@pacbell.net> wrote in message news:BXDGh.5971$jx3.1904@newssvr25.news.prodigy.net...> I've written vba code to send mail via Outlook, but when running the code, > the code interrupts to prompt the user to choose an Outlook profile.  Is > there a way to bypass this prompt, and go with the default profile?>> Thanks in advance. 
0
SJ
3/4/2007 11:49:41 PM
OK, here's the code....Public Sub SendMail(strSubject As String, strMsg As String)     Dim MyOutlook As Outlook.Application     Dim MyMail As Outlook.MailItem     Set MyOutlook = New Outlook.Application     Set MyMail = MyOutlook.CreateItem(olMailItem)     MyMail.To = "joe@abc.com"     MyMail.Subject = strSubject     MyMail.Body = strMsg     MyMail.Send     set MyOutlook = Nothing     set MyMail = NothingEnd SubSJ wrote:> yes there is,  but you might need to paste in the code you use because there > is more than 1 way to use outlook and it depend on how you have done it.> > > > "Phil Hellmuth" <billort@pacbell.net> wrote in message > news:BXDGh.5971$jx3.1904@newssvr25.news.prodigy.net...>> I've written vba code to send mail via Outlook, but when running the code, >> the code interrupts to prompt the user to choose an Outlook profile.  Is >> there a way to bypass this prompt, and go with the default profile?>>>> Thanks in advance. > > 
0
Phil
3/5/2007 1:42:38 AM
Reply:

Similar Artilces:

outlook express password #3
I want to password protect my outlook express so that you need the password to access new mail. why is it that even though the "enter password box" appears, you can still see the "in box" messages in the screen behind? if you "click" cancel on the enter password, you can still access any inbox mail that appears on the screen. is there a setting so that when you click outlook icon and enter a password to access, no other box appears on the screen? This newsgroup is for support of Outlook 97, 98, 2000, 2002 & 2003 from the Office family for Intel PCs. For Outl...

Resolution to printing mail merge 4 up
Here is what I had to do in order to print postcards 4 up mail merged properly so that each name is on their own card. I am using Publisher 2003 so I don't know if this will work in other versions. Using the Tools>Mail Merge Wizard, Set up the mail merge the way you want it to appear (steps 1 thru 4). Only stop at step 4 DO NOT continue to step 5. Go to File>Print Merge At this point you can select the printer, properties etc as well as change copies per sheet and print range or all. This seems to work and will place a different name/address on each card on that page. I ...

How do I send copies emails without sending attachments?
I send emails with attachments to our bank. My boss wants a copy of the email but not a copy of the attachment. How do I do that? Steve Bramblett wrote: > I send emails with attachments to our bank. My boss wants a copy of the > email but not a copy of the attachment. How do I do that? Each recipient gets the SAME copy of the e-mail. If you want different recipients to get different versions of your e-mail, you have to send different e-mails. ...

No message in outbox
I tried to send a message with 1Mb attachment to 40 recipients in the bcc field. It gave me an error message from the isp's server, the message was NOT sent (I've checked), it did NOT arrive in Sent Items, but neither is it in the Outbox any more. I can send and receive email successfully. Problem is, every few minutes Outlook tells me it's sending message 1 of 1, it fails and gives me the same error message. Yet there is no message in the Outbox. But what happened to the original message when it first failed to send? I guess it's 'stuck' somewhere but I can...

Sending mail from selected email address
Hi All, As I have 4 email accounts set up in Outlook, I understand that I can send mail from each or any account. The accounts are listed under tools / Send and Receive / then each of the accounts. How can I choose which account to send from so that the recipient see's who I want it to be from?? Hope that explains it. Regards Alan On Sat, 16 Apr 2005 21:10:48 -1000, The Fatman <albaxter@optushome.com.au> wrote: > Hi All, > > As I have 4 email accounts set up in Outlook, I understand that I can > send > mail from each or any account. > > The acco...

Master Category List keeps reverting to default list
I have had the Master Category List revert to the default list several times now. This has happend at least 6 times since I upgraded to Office 2003 a year ago. This is annoying, as I have my own, different, list of categories that I use. I have used the good info that Sue Mosher provides at: http://www.slipstick.com/outlook/olcat.htm to make a backup of my catagories. Using the registry restore routine certainly makes the fix a bit easier than retyping all of the categories. Still, having to dink with the registry to keep outlook from destrying my data is more than a bit unnerving. Does...

Sending a macro to another PC-how?
How do you send a macro you've written to another PC so that they can save it in their Personal.xls file (at Program Files\Microsoft Office\Office\XLStart)? You can export a macro and save it, to do this from your workbook, right-click the workbook's icon and pick View Code. This icon is to the left of the "File" menu this will open the VBA editor, click on the module you want to save and go to file and export file, then save it to a floppy or what ever you backup to, then import it to the new workbook. -- Paul B Always backup your data before trying something new Using ...

PowerPoint 2003 to accessible Word 2003 via VBA?
I'd like to extract all content from a Windows PowerPoint 2003 document and place it in a Word 2003 document, as Word to PDF conversion seems to provide better-quality tagging than a PowerPoint to PDF conversion. I know I can save the outline as RTF and open that in Word, but the outline does not include any of the following: - text added on a blank slide layout - text in a text box - tables. - images. Is there any way to copy all content from a PowerPoint presentation to a Word document, such that all text remains text and all tables remain as tables? Charles Belo...

Word as Outlook e-mail editor
I'm using Windows XP and Microsoft Office XP standard, 2002 version. Word has always been my e-mail editor, but today when I tried to respond to an e-mail I got the following message: "This form requires Word as your e-mail editor, but Word is either busy or cannot be found. The form will be opened in the Outlook editor instead." After a delay, the form opens, but when I click "Send," Outlook crashes. Any suggestions? ...

Sending mail from remote location
my mail works great while at home. when I go on the road I can receive ail but not send. I get the following error message: Subject 'SKIDOO MACH Z 800LT (long track / long tunnel) (Jackson)', Account: 'Jeff', Server: 'smtp.charter.net', Protocol: SMTP, Server Response: '571 imp11 smtp.charter.net OTcuMTQ3LjE2LjIzMA== You must connect from Charter IP space. E1110', Port: 25, Secure(SSL): No, Server Error: 571, Error Number: 0x800CCC61 It worked on my last laptop and I have not been able to figure it out on this one. I can't remember what I...

Outlook 2007
Hi, I am having the following problem with Outlook 2007. Whenever I run outlook the CPU utilization goes up over 99%. I've been using OL 2007 for over 4 months and it was working fine. Tried repairing/recreating the OST and PST files. Tried disabling all Add-ins (LinkedIn, Outlook Connector, etc.) tried running Outlook in Safe Mode. Nothing seems to work. Anyone has any ideas as to what might be wrong?? I havent recently installed or uninstalled anything on my machine. I am running Windows XP with Service Pack 2, Norton Antivirus, RealSecure Desktop protector. Do you have iTunes/iPod...

Installing CRM SFO (Sales for Outlook)
Hi all, I know this has been answered before but I can´t find it on the newsgroups or in the knowledge base. What is the fix for installing SFO without the local user having Admin rights. I found the KB arcticle (https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?WTNTZSMNWUKNTMMYVTQUUXNNZOUKYPPPQSNNPQVXOKWVPZWKNZPWQPQPROKZKMLMMYLZSMKRLWVZOQWZZYTLUUVMQLVTLOKP) on how to do it buy granting admin rights to each of the users individually, but I remember reading somewhere how to fix this problem. Is there a hotfix or somthing? Ideas? David Try this link http://www.microsoft.com...

Send and Recieve Fix
For a long time I had a problem with my Send/Recieve function in Outlook. This happended in both Outlook 2000 and my current version - 2007. I found I had to re-boot my computer to perform a Send/Recieve in Outlook. Otherwise the sequence would start then stop and say it could not perform due to an error. After extensive Internet and News Group research I decided it was time to run a check on disk errors. This Windows XP facility seemed to have fixed my Outlook problem. I did this about a few months ago now and I have since had no problems with my send and recieve. Unfortunately I do have ...

mail size restriction
how to restrict the maximum size of message is 2MB for all user to send through my exchange server 5.5 both local and ims You can set restrictions on the IMS,. Local user restrictions in 5.5 are a bit more tricky. However, by forcing messages through the MTA and applying the limits on the MTA, you can accomplish that as well. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem Value : No Local Delivery Type: DWORD Value: 0x1 Test of course! On Sat, 1 May 2004 22:37:43 -0700, "jameel" <anonymous@discussions.microsoft.com> wrote: >...

Unable to send?
Hi, I've got MOOL, and i"m usign ti with outlook. The emails that I'm sending are just "stuck" in the outbox? Can anyone give me an idea of what's going on? Rex Did it ever work? Are you able to receive? -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP Roland Schorr & Tower http://www.rolandschorr.com Microsoft OneNote FAQ: http://www.factplace.com/onenotefaq.htm **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! "Rekks" <rex_flynn@hotmail.com> wrote ...

Sending messages in Outlook
We have a user that everytime that she sends an email she will get booted out of Outlook. The email does go through, but she will have to get out of Outlook. When she goes back into Outlook, everything is fine until she sends another message. Any help would be appreciated. ...

Outlook not opening IE8
I am running Windows 7 64 bit, Outlook 2007 and IE8. Recently Outlook has given me an error message when I click on a hyperlink to IE, stating "this operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator." I am the administrator; what do I do? -- Larry "Larry H" <LarryH@discussions.microsoft.com> wrote in message news:BE68908B-9B34-442E-B1C1-8022078730C9@microsoft.com... > I am running Windows 7 64 bit, Outlook 2007 and IE8. Recently Outlook has > given me an error message when I c...

Good practise
THanks for your reply. Wil this be fine even if my users have mailboxes round about 1GB. My GM's mailbox is 4GB. Can i start moving the mails back to the exchange DB and how will it affect the performance of my exchange box.Thank you craig >I suggest applying Exchange SP2, editing registry to allow DB size to >accommodate your storage needs and increasing storage limits. >After all, .psts are kept on the server too, taking space. Message in >.pst needs the same or more disk space than in Exchange DB. Also the >same message sent to many recipients stored in Exchange DB...

No Permission to Send/Receive Email???
I just replaced our server hardware, upgraded to WS 2k3 Enterprise and created a new domain. I transferred the client files and desktop on our desk/laptop computers over to the new domain. We do NOT have Exchange installed yet, but use Outlook 2002 with the email etc. saved on the client. One one client machine (mine), the email, calendar, etc are there, but when I hit the Send/Receive button, I get a message saying that I don't have permission to perform this operation. Also when I try and change the automatic check for email option it tells me I don't have permission. ...

Clicking on new mail notification does not open email
This is a multi-part message in MIME format. ------=_NextPart_000_0053_01CACB73.FC871830 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I finally upgraded from WLM 2 to 3 (14.0.8089.0726) this afternoon (Win = XP SP2). When I get a new mail notification via Messenger and click on = it the email does not open. I have to go to the inbox to open it. Any = ideas? Kevin ------=_NextPart_000_0053_01CACB73.FC871830 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTY...

Send Do Not Send
When I attempt to email via a print server - OutLook Express displays the message "A program is attempting to email on your behalf" Send or Do Not Send - How do you prevent this from happening? And just automatically send? ...

Can't find my pab file in outlook 2002
I can't find my pab file so I can copy my contacts to another computer. I don't know that Outlook uses a PAB file unless you specified it when you set that version of Outlook up. If you did, do a file search for *.pab. If not, then it should be located in a .pst. Are you using Outlook via POP3 for mail, IMAP, Exchange (usually a business environment? -- K. Orland Thoughts lead on to purposes; purposes go forth in action; actions form habits; habits decide character; and character fixes our destiny "Kathy" wrote: > I can't find my pab file so I can copy my cont...

Forwarding Mail to an external Address
I receive email as I am a member of a distribution group. I want to set a rule up in Outlook to automatically forward items addressed to that distribution group, to an external email address. Is this possible? I tried to set up the rule, but could not get it to work. Thanks On Thu, 20 Oct 2005 17:17:01 -0700, RayRedSoxFan <RayRedSoxFan@discussions.microsoft.com> wrote: >I receive email as I am a member of a distribution group. I want to set a >rule up in Outlook to automatically forward items addressed to that >distribution group, to an external email address. Is this p...

Sending on behalf... Exchange 2003
Hi everyone, Is there a better way to give a few users the ability to send mails also from the info@domain.com mailbox without having them logout and login to a different Outlook 2003 profile... Or without the text sending on behalf of... So my question is, Is there an easy way that a user can select another e-mail address and send mails out...? Thanks a lot in advance!! Regards, BY On Thu, 05 Oct 2006 12:57:12 GMT, "BY" <nospam@mail.com> wrote: >Hi everyone, > >Is there a better way to give a few users the ability to send mails also >from the info@dom...

Lost Contacts in Outlook
I installed XP Pro over Home...how do I retrieve my Contacts? Take a look here, it may help: http://www.slipstick.com/config/backup.htm --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, anonymous@discussions.microsoft.com asked: | I installed XP Pro over Home...how do I retrieve my | Contacts? ...