Messaging Confusion

Forgive me if this isnt the right forum for what I am about to query.

I will paste two blocks of messaging codes below, both using CDO, but
different in implementation. The first block I will refer to as Block1 and
the second Block2. First off, let me say I am confused because even though
the two are CDO technologies, they are different - having different
properties and methods. For the most part, I want to use Block2, because it
synchronizes with my local copy of Outlook 2003 - IOW: The Outbox will show
that there is a message going out after I execute the Send method. What I
find missing in Block2, that is available to Block1, is the HTMLBody
property. To make an already long post short, let me skip to the chase here.
I have a function that returns a table in HTML , how can I get Block2 to
send the table ,  not the markup text? It had a TextBody property but no
HtmlBody. Or, how can I setup Block1 so that it syncs with my Outlook

Sub CDOSender()
    Dim objMessage As Object

    Set objMessage = CreateObject("CDO.Message")                  'Create
the message object.

    With objMessage
        .From = """Wayne""<>"
        .To = ""
        .Subject = "An Email From Active Call Center."
        '.TextBody = "This is some sample message text.."
         .HTMLBody = strHTML
        .AddAttachment ("c:\working\access\wayneallcounty.mdb")   'Add

        With .Configuration.Fields

..Item("") =

..Item("") =

..Item("") =

..Item("") =

..Item("") = "wn"

..Item("") = 25

..Item("") = False

) = 60
        End With

        .Send                                             'Send message
    End With
End Sub

Sub CDO()
    Dim Msg As Object, AddrEntries As Object, AddrEntry As Object, Sess As
Object, AddrListColl As Object
    Dim AddrListsColl As Object, AddrList As Object, Attchmt As Object
    Dim fAddressExist As Boolean, Recips As Object, Recip As Object
    Dim fso As FileSystemObject, RecFile As File, TS As TextStream,
AllCountyFile As File
    Dim AttachFile$
    Const CdoFileData& = 1

    Set Sess = CreateObject("MAPI.Session")
    Sess.Logon ProfileName:="Outlook", NewSession:=False

    If Sess Is Nothing Then
        MsgBox "Unable to logon to MAPI messaging system"
    End If

    Set AddrListsColl = Sess.AddressLists
    Set AddrList = AddrListsColl(1)
    Set AddrEntries = AddrList.AddressEntries
    Set AddrEntry = AddrEntries(1)
    Set Msg = Sess.Outbox.Messages.Add

    With Msg
        .Subject = "yayaya"
        .Text = "(TS)"
        Set Recip = .Recipients.Add
        Recip.Name = AddrEntry.Name
        Set Attchmt = .Attachments.Add(AllCountyFilename, 0, CdoFileData,
    End With

End Sub

jongunn (22)
6/5/2005 10:33:42 PM
outlook 87535 articles. 10 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 29

JonWayne <> wrote:

> Forgive me if this isnt the right forum for what I am about to query.

Try news://
Brian Tillman
tillman1952 (16053)
6/6/2005 2:48:19 PM

Similar Artilces:

e-mail messages, from outlook, to cd, how to
hello there, i have a few thousant e-mail messages in outlook maps. i want to save them, i would like to burn them on a cd. i would like to move them just by one klik of my mouse i can rename them one by one, and then put them in a new map on C disk, an than burn them on a cd, but i want to do them all by just one mouse klick. please can you help me. What are Outlook Maps?? All of your mail is contained in a file with a .pst extension. You can export your folders that you want saved to a .pst file and then burn that to CD (you will need to copy it back to your hard drive and remove the r...

How do you make Inbox messages stay bold until opened?
While in the Inbox, new messages are bold. Just by "passing" by them, the bolding is removed and it appears the messages have been read. How do you make the message remain bold until the message is actually opened? Tools, options, other, Reading pane button - uncheck Mark as read when selection changes. -- Diane Poremsky [MVP - Outlook] Outlook Tips: Outlook & Exchange Solutions Center: Outlook Tips by email: EMO - a weekly newsletter about Outlo...

No message rules?
I just switched from Outlook express (which I really like) to Windows live mail. It did a very good job of finding my old contacts and messages, but I don't see my rules. I used to route incoming messages to specific folders based on sender or message title. I can't find the corresponding feature in Windows live mail. Am I just not looking in the right places or does Live mail just not offer the equivalent feature?? ED On the Menu Bar: Tools | Message Rules. Don't see the Menu Bar? The Alt button will temporally enable the Menu Bar, or click on the Menus ...

Reject messages with custom message?
A policy has dictated an account of a former employee respond to all incoming email messages with a custom note and not allow the messages to accumulate in the mailbox. In fact, for admin purposes it would be great if there was no longer a AD account and mailbox. Thank you, -Bob I suggest that you request a few thousand dollars to hire a programmer to write you a custom event sink so that you can comply with the policy. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "just bob" <> wrote in message news:%23...

Confused by the wait for timer in CRM 4.0
How can I make a workflow to send e-mail after x days from creation of the record? I tried to use the execution time and timeout options under local values- workflow, but it didn’t work it stuck at waiting status and I can’t understand the way it work in CRM 4.0 Detailed instructions on how to configure wait for timer in CRM 4.0 will be much appreciated. See a simple example on this blog and search this forum , the question about Timer has already beeen answered . /Aamir In your workflo...

block messages
Hi all, can I block on Exch5.5 some inbound messages coming through X400 Connector. I have created Contact with internet email address (non AD user) I have tried Delivery restriction Tab to reject messages from specific mailbox (that Contact) in the internet, but it doesn't work. Is any solution, how to filter on exch5.5 sp3 Thanks Marek On Wed, 22 Mar 2006 11:34:08 +0100, "Marek" <> wrote: >Hi all, >can I block on Exch5.5 some inbound messages coming through X400 Connector. >I have created Contact with internet email addr...

Outlook message rules for sent message from me.
Greetings, There has always been a message rule I wanted, and never asked about. So now I will. I default a copy of all my send messages to the sent folder. They are marked at read... which is good, because if I send the message, I obviously read it. <grin> At times, I wish I could send the message to other folders. Example. I have a folder called "family". If I send a message to "family", I'd like to be able to put a copy in the "family" folder. I know you could do this, but the message is not marked as read. Thus, the folder is bolded/...

Exchange 2003, lost messages and tracking
AD 2000 domain, single forest, single domain, single exchange site Exchange 2003 Windows 2003 Ent I have a strange problem going on here. I’ve been receiving complaints periodically about users not receiving message with xls attachments. I sent the user and myself 3 messages from a test yahoo account with sequential subjects (1,2,3…) and a .xls attachment. I received all 3 messages and attachments to my account. The user in question only received the 2nd and 3rd message with attachments. The message tracking center shows all 3 messages being delivered with the final entry being “S...

Message removal
I'm attempting to remove 3 messages that keep appearing in my Sync Issues / Server Failures folder. I delete them, and the next day they are back again. I've tried extracting them with the ExMerge utility, run in Archive mode to delete them from the store. It fails, and in the ExMerge.log file it says: [11:54:12] Error copying messages from folder '\Sync Issues\Server Failures' (MAPI_W_PARTIAL_COMPLETION) Any ideas how I can extract these messages? I would try disabling any AV on the machine you are running Exmerge on and see if that works. On Mon, 21 Feb 2005 09:42:...

Outlook 2003 Error Message #8
When sending messages to my internal MS Exchange recipients I get this error message. "You do not have permission to send to this recipient." Any help or work around for this. I searched the MS Knowledge Base and could get this exact error to come up. Thanks. ...

confusing licensing
I currently have SBS 4.5 (NT4.0 & Exchange 5.5). I want to upgrade to a new exchange server as well as a directory server. I have about 75 users. Do I need to have a 75-user license for Windows Server and exchange on my exchange server as well as 75-user license on the directory server? ...

number of messages in inbox
how to find the number of messages currently in my inbox? If you have the status bar enabled from the View menu and then highlight the folder the number of items is displayed in the status bar <> wrote in message news:08ad01c3d513$e0e22dc0$a501280a@phx.gbl... > how to find the number of messages currently in my inbox? ...

NDR Message 5.7.1
I have a problem with message beging recieved through our exchange server. This recently started. One of our other admins did some tweaking before he went out of town and we are having a hard time finding out what was done and yes we have tried to contact him. Mail sent from exchange users come in fine but when sent from external addresses (the ones we have tested) do not come in and get a ndr message. I don't know how long this has been happening exactly but it has been a week since the other admin left. Used both DNSreports / DNSstuff and oddly both have the MX and DNS succes...

Message Tracking with Message ID
I work on the Defense Message System. We get error reports for messages with a message ID on them. The problem is how does one find the message that goes with the ID in a "FIND" of the Sent Items on the senders computer? I have not found a way that is user friendly to do this search on the users computer. Very Respectfully, ET3 Hettinger USN ...

OLE Server Error Message
Access 2002. I am running a database compiled with Access 2003 on a system that is using Access XP (2002). When I exit the database I get an "information" dialog that says: A problem occurred while Microsoft Access was communicating with the OLE server. Try one or more of the following: *Make sure you're connected to the network server where the OLE server application is located. *Close the OLE server and restart it outside of Microsoft Access. Then try the original operation again from within Microsoft Access. *Reinstall the OLE server to ensure that it's register...

Error message Importing INV File
I am using Money 2005 Samll Business and when I try to import a custom invoice I receive the following error message. Money cannot import an INV file that was created before July, 2002. Please try importing a more recent version of the file. I just created my file tonight and the properties say it was created 11/19/04 so there should be no problem with the date. I am set up for US regional settings. Has anyone ran into this and figured a way around it? Thanks, ...

Suddenly no pictures in HTML messages
Running XP pro SP3, Outlook 2002. About Wed. or Thurs, any html messages received do not include pictures. Did Microsoft send out an update that might have interfered? Or did I do something I'm not aware of? Thank you, Roberta Roberta, you wrote on Sat, 4 Apr 2009 06:52:06 -0700: > About Wed. or Thurs, any html messages received do not include > pictures. Did Microsoft send out an update that might have > interfered? Or did I do something I'm not aware of? There is no such an update. Verify if the Internet Explorer is in offline mode (go to the file menu in IE)...

Copy Local Message Rule
I've created a complicated message rule for filtering that I would like to put on other client machines. Can I copy it? Is this possible? WIn2k server/ Exchange 2k w/all current SPs. STEVE ...

cannot move messages
Sometimes when I attempt to move a message from the inbox to a storage folder I receive the following error message - "An unknown error has occured. The selected message(s) could not be moved." Why am I receiving this message and how can this problem be corrected? Any suggestions would be appreciated. Thanks What kind of mail account is it? POP3, IMAP or HTTP? Both IMAP and HTTP accounts synchronize with the mail server, so moving a message from the mail account to the storage folder requires that WLM tell the mail server to delete the message from the server ma...

emailing as message
Using Publisher 2003. Whenever I send a newsletter as m essage., The document comes out a little smaller to the person that is ecieving the message. However, whenever i save the document as aa jpeg file and hen send is a opicture it comes the exact size which is 8.5 * 11. What can I do to make it not whrink i want to send as a message and not as a JPEG If the recipient doesn't have Publisher, then you could try sending it as a ..pdf attachment. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question "Carl Thame" &...

Number of users per message store.
Does anyone know an easy way to calculate the number of ussers per message store, other tan counting them seperatly. Thanks, Mark in the ESM, you should be able to drill down to "Mailboxes", select them all, and get a count down in the "status" bar... -- Susan Conkey [MVP] "Mark A. Dudley" <> wrote in message > Does anyone know an easy way to calculate the number of ussers per > message store, other tan counting them seperatly. > > Thanks, > Mark On Wed, 24 Ma...

Hi all, Can anyone tell me how to get the exception message from the catch_all exception handler ? try { //expection code } catch(...) { how to get the exception message?? } thanks in advance thanvir ...

Outlook 2003 ignores line breaks in plain/text messages
Hi All, I am running a brand new installation of Outlook 2003 on XP SP1 & all messages formatted plan/text display as one big paragraph. I tried unticking the "Remove extra line breaks in plain text messages" option but it did not work. Search Google's archive but no luck. Surely I am not the only one with this problem? Thanks, Brett. Brett <> wrote: > I am running a brand new installation of Outlook 2003 on XP SP1 & all > messages formatted plan/text display as one big paragraph. Look at Tools>Options>Mail Format>Interne...

Messages with no message ID?
I have a number of emails sitting around in my outbound queue (Exchange 2003) that never get sent. Some have been in queue for several months (>6 months). When I look in the queue itself and Find Messages, in the search results I see the email, but it has no sender. Properties reveal no message ID, sender, subject nor recipient. Futher, in my Queue directory, I see no .EML files that correspond with any of these stuck emails. Anyone know what the problem is here? ...

How do I make a "deleted" message disappear off the inbox list?
It gets a "strike-through" font but doesn't go away. "Torwin" <> wrote in message > It gets a "strike-through" font but doesn't go away. You have an IMAP account? Edit-Purge..... Yes, it is IMAP. And I have found one answer, it's under the View menu but in a not-obvious place: View | Arrange By | Current View | Hide Messages Marked for Deletion Thank you for your reply Gordon, is this what you were going to say? "Gordon" wrote...