Results 1 to 7 of 7

Thread: Insert text???? Please Help!

  1. #1
    WorkHorse
    Guest

    Unhappy Insert text???? Please Help!

    Can I get an example of how to insert text in an open Outlook reply window? Pretty, pretty, please.

  2. #2
    WorkHorse
    Guest
    OK, here's what I came up with:

    VB Code:
    1. Private Sub UpdateMailReply()
    2.    
    3.     'Add text to the top-most Outlook message window.
    4.  
    5.     Dim objOutlook As Outlook.Application
    6.     Dim objOutlookInspector As Outlook.Inspector
    7.     Dim objOutlookAttach As Outlook.Attachment
    8.    
    9.     'Create the Outlook session.
    10.     Set objOutlook = CreateObject("Outlook.Application")
    11.  
    12.     'Get the top-most message window.
    13.     Set objOutlookInspector = objOutlook.ActiveInspector
    14.  
    15.     'Add text to the message.
    16.     objOutlookInspector.CurrentItem.Body = "Hello World!" & objOutlookInspector.CurrentItem.Body
    17.  
    18.     'Add attachment to the message.
    19.     Set objOutlookAttach = objOutlookInspector.CurrentItem.Attachments.Add("C:\MyTextDoc.txt", 1)
    20.    
    21.     Set objOutlook = Nothing
    22. End Sub
    But that kills all the pictures and formatting in the message and replaces it with straight text. Isn't there a way to just add text to the body without replacing the entire body? Or better yet, can I insert a file as text? Outlook lets you do this, but I couldn't find any InsertText method or something to use in VB.

  3. #3
    WorkHorse
    Guest

    Unhappy

    *BUMP*

    Anyone? Insert file text or add text to outlook reply without changing body format. Anyone? Please!

  4. #4
    Addicted Member
    Join Date
    Feb 2002
    Location
    Disney Land
    Posts
    190

    Post reply

    sorry dont know

  5. #5
    WorkHorse
    Guest
    Anyone know anywhere where I might even be able to find a clue to the answer? or something close? or anything?

    I can't believe this is this hard. Nobody seems to know how to do this. Is this impossible? Doesn't a mail item have a range or something? This has to be possible. I really need this. Anyone?

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Thumbs down JUST A HUNCH

    This is just a hunch, don't rely on me.

    Try getting the handle on the Open Outlook Window,
    go through your API Text Viewer, there must be some function for adding text to an open window.

    It's just a hunch. I'm a mid-newbie thing guy.

  7. #7
    WorkHorse
    Guest
    I wrote a stupid workaround that works for now, but I will find the answer someday, someday.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width