Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Worksheet Selection to Outlook. How?

  1. #11
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK thats not exactly right is it ermmm.
    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  2. #12
    Board Regular
    Join Date
    Mar 2002
    Location
    Cambridge England
    Posts
    521
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Jack ..

    Thanks a lot for your suggestions. I will play with your code to see if if I can get it to work..
    This is the code that almost works. It works for Smozur but not me. I supect its due to different OS/ or Office progs. Not you need to use the Outlook Add In :-

    'This sub set the range
    Sub CallSub()
    Dim newRange As Range
    Set newRange = Sheet2.Range("B1:E38")
    Call CreateNewEmail(newRange)
    End Sub

    'This sub creates a new email message and fill the subject and also body as your range data
    Sub CreateNewEmail(myRange As Range)
    Dim myOLApp As Outlook.Application

    Set myOLApp = New Outlook.Application
    Dim myOLItem As Outlook.MailItem
    Set myOLItem = myOLApp.CreateItem(olMailItem)
    myRange.Copy

    myOLItem.Subject = "QUOTATION : " & Sheet2.Range("D2").Value
    myOLItem.Display

    SendKeys "%{TAB}"

    SendKeys "{TAB 3}"
    SendKeys "^v"

    myOLItem.To = Sheet2.Range("H14").Value

    End Sub

  3. #13
    New Member
    Join Date
    Apr 2002
    Location
    California
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    sorry, Eddy -- I haven't coded for Save As HTML or for using Outlook before. I was going to at least get you started, but there's no references at all in my Help files about Saving As HTML, and the Macro Recorder records nothing when I try!

    I am, of course, still stuck using Excel 97, but since you were searching for a version-independent solution I figured I would give it a shot. Still, I know the support and documentation of web publishing has to be better in 2000. I would investigate the VBE help files on the PublishObject and SaveAs methods, then see if someone else can provide basic code for you to tweak.

    Jack's got a good start for you on controlling the Outlook portion of it; again, you'll need to check Outlook 2000's VB help files for the syntax for inserting a file as text only.

    Good luck -- sorry I couldn't do more on the code front!

    Cath

  4. #14
    MrExcel MVP Anne Troy's Avatar
    Join Date
    Feb 2002
    Location
    Westwood NJ
    Posts
    2,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Smozgur can be reached at Oz@TheWordExpert.com


    ~Anne Troy

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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