+ Reply to Thread
Results 1 to 82 of 82

outlook 2007 automation

  1. #1
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    outlook 2007 automation

    Thank God I found this forum ...Guys
    I need Help ...Here is the problem I have tried to explain it through the attachment also ..

    Object: Outlook 2007 automation
    Components: Microsoft Outlook 2007 and excel 2007
    Query:
    1/ I want to send e mails to all the names in Column A,and with E mails in Column B:C:D:E .Imported from the outlook contact list.how to import the list into this format from excel?
    2/ The content of the e mail will contain Text along with the account status imported from Excel 2007 to outlook 2007 without losing the table and color (format)
    3/ The format never changes and I want to link it to the contact details in the outlook 2007 address book .
    4/ I also want to add 'Bcc:' and Cc: using the outlook contacts.
    Attached is the Excel Sheet giving a screen shot of the requirement.Please help God Bless
    Attached Files Attached Files
    Last edited by nuttycongo123; 01-27-2011 at 06:56 AM.

  2. #2
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: outlook 2007 automation

    I have not tested this, i use thunderbird not outlook.
    Please Login or Register  to view this content.
    Last edited by GaidenFocus; 01-26-2011 at 12:33 PM.

  3. #3
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Thanks a ton will check and update ...

  4. #4
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey I am gettin :
    Runtime error # 13 type mismatch !! any ideas on this.I am an absolute newbee at VBA

  5. #5
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Couple of things You missed here :
    1/ I want my signature to be on the e mail.
    2/ declaring Newline as a variable .. if I write it as :

    Dim NewLine as Long

    Will that be correct ??
    Chao !!

  6. #6
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: outlook 2007 automation

    try
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Still the Same error "Run time Error 13 -Type Mismatch"...any clue

  8. #8
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: outlook 2007 automation

    ill try it when i get home, i have outlook there. my work computer does not. ill see what i can do!

  9. #9
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Quote Originally Posted by GaidenFocus View Post
    ill try it when i get home, i have outlook there. my work computer does not. ill see what i can do!
    @ thankls awaiting your respponse

  10. #10
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi,

    I think you can remove the "Dim Newline as string" & add "vb" to the front of "newline" where it is used (ie "vbnewline"). vbnewline is a known/native vba constant for ascii (?) code number 13, which is a type of line break.

    Edit: what line of code is highlighted if you click debug when the error message pops up? /edit

    hth
    Rob
    Last edited by broro183; 01-29-2011 at 07:11 AM.
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  11. #11
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Quote Originally Posted by broro183 View Post
    hi,

    I think you can remove the "Dim Newline as string" & add "vb" to the front of "newline" where it is used (ie "vbnewline"). vbnewline is a known/native vba constant for ascii (?) code number 13, which is a type of line break.

    Edit: what line of code is highlighted if you click debug when the error message pops up? /edit

    hth
    Rob
    I have new set of queries now .
    1/ Edit Following code.in line with the my uploaded file (attachment )
    2/ How to combine two functions to act as one
    I am posting two procedure and functions which will help ,if corrected of course ,in achieving the desired goal ,.If you can edit /correct /rectify these i will be great full.

    Procedures:


    Sub Send_Row_Or_Rows_2()
    ' Don't forget to copy the function RangetoHTML in the module.
    ' Working in Office 2000-2010
    Dim OutApp As Object
    Dim OutMail As Object
    Dim rng As Range
    Dim Ash As Worksheet
    Dim Cws As Worksheet
    Dim Rcount As Long
    Dim Rnum As Long
    Dim FilterRange As Range
    Dim FieldNum As Integer
    Dim strBody As String
    Dim SigString As String
    Dim Signature As String


    On Error GoTo cleanup

    Set OutApp = CreateObject("Outlook.Application")

    With Application
    .EnableEvents = False
    .ScreenUpdating = False
    End With

    'Set filter sheet, you can also use Sheets("MySheet")
    Set Ash = ActiveSheet

    'Set filter range and filter column (column with e-mail addresses)
    Set FilterRange = Ash.Range("A1:H" & Ash.Rows.Count)
    FieldNum = 2 'Filter column = B because the filter range start in column A

    'Add a worksheet for the unique list and copy the unique list in A1
    Set Cws = Worksheets.Add
    FilterRange.Columns(FieldNum).AdvancedFilter _
    Action:=xlFilterCopy, _
    CopyToRange:=Cws.Range("A1"), _
    CriteriaRange:="", Unique:=True

    'Count of the unique values + the header cell
    Rcount = Application.WorksheetFunction.CountA(Cws.Columns(1))

    'If there are unique values start the loop
    If Rcount >= 2 Then
    For Rnum = 2 To Rcount

    'Filter the FilterRange on the FieldNum column
    FilterRange.AutoFilter Field:=FieldNum, _
    Criteria1:=Cws.Cells(Rnum, 1).Value

    'If the unique value is a mail addres create a mail
    If Cws.Cells(Rnum, 1).Value Like "?*@?*.?*" Then

    With Ash.AutoFilter.Range
    On Error Resume Next
    Set rng = Selection.SpecialCells(xlCellTypeVisible)
    On Error GoTo 0

    If rng Is Nothing Then
    MsgBox "The selection is not a range or the sheet is protected. " & _
    vbNewLine & "Please correct and try again.", vbOKOnly
    Exit Sub
    End If

    With Application
    .EnableEvents = False
    .ScreenUpdating = False


    End With
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next
    With OutMail
    .To = Cws.Cells(Rnum, 1).Value
    .CC = ""
    .BCC = ""
    .Subject = "Test mail"
    strBody = "<H3><B>Dear Customer</B></H3>" & _
    "Please visit this website to download the new version.<br>" & _
    "Let me know if you have problems.<br>" & _
    "<A HREF=""http://www.rondebruin.nl/tips.htm"">Ron's Excel Page</A>" & _
    "<br><br><B>Thank you</B>"
    .HTMLBody = strBody & RangetoHTML(rng)
    .Display 'Or use Send
    End With
    On Error GoTo 0


    With Application
    .EnableEvents = True
    .ScreenUpdating = True
    End With

    Set OutMail = Nothing
    Set OutApp = Nothing
    End With

    End If
    Set OutMail = Nothing
    'End If

    'Close AutoFilter
    Ash.AutoFilterMode = False

    Next Rnum
    End If

    cleanup:
    Set OutApp = Nothing
    Application.DisplayAlerts = False
    Cws.Delete
    Application.DisplayAlerts = True

    With Application
    .EnableEvents = True
    .ScreenUpdating = True
    End With
    SigString = "C:\Users\" & Environ("Alok") & "\AppData\Roaming\Microsoft\Signatures\Alok.htm"

    If Dir(SigString) <> "" Then
    'Signature = GetBoiler(SigString)
    Else
    Signature = ""
    End If

    End Sub

    2] Procedure:

    'To use the code that is presented in this section, first create a table on the active sheet with the following columns:

    '* Column A: Names of the people

    '* Column B: E-mail addresses

    '* Column C: yes or no ( if the value is yes, an e-mail message is created)

    'The following subroutine loops through each row on the active sheet and, if there is an e-mail address in column B and Yes in column C, an e-mail message for each person listed in column A is created that has a reminder



    Sub Create_Mail_From_List()
    ' Works in Excel 2000, Excel 2002, Excel 2003, Excel 2007, Excel 2010, Outlook 2000, Outlook 2002, Outlook 2003, Outlook 2007, and Outlook 2010.
    Dim OutApp As Object
    Dim OutMail As Object
    Dim cell As Range

    Application.ScreenUpdating = False
    Set OutApp = CreateObject("Outlook.Application")

    On Error GoTo cleanup
    For Each cell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
    If cell.Value Like "?*@?*.?*" And _
    LCase(Cells(cell.Row, "C").Value) = "yes" Then

    Set OutMail = OutApp.CreateItem(0)
    On Error Resume Next
    With OutMail
    .To = cell.Value
    .Subject = "Reminder"
    .Body = "Dear " & Cells(cell.Row, "A").Value _
    & vbNewLine & vbNewLine & _
    "Please contact us to discuss bringing " & _
    "your account up to date"
    'You can also add files like this:
    '.Attachments.Add ("C:\test.txt")
    .Send 'Or use Display.
    End With
    On Error GoTo 0
    Set OutMail = Nothing
    End If
    Next cell

    cleanup:
    Set OutApp = Nothing
    Application.ScreenUpdating = True
    End Sub


    3// Functions:
    Option Explicit

    Function RangetoHTML(rng As Range)
    ' Changed by Ron de Bruin 28-Oct-2006
    ' Working in Office 2000-2010
    Dim fso As Object
    Dim ts As Object
    Dim TempFile As String
    Dim TempWB As Workbook
    'Dim GetBoiler 'ByVal_
    'Dim sFile As String 'As String

    TempFile = Environ$("temp") & "/" & Format(Now, "dd-mm-yy h-mm-ss") & ".htm"

    'Copy the range and create a new workbook to past the data in
    rng.Copy
    Set TempWB = Workbooks.Add(1)
    With TempWB.Sheets(1)
    .Cells(1).PasteSpecial Paste:=8
    .Cells(1).PasteSpecial xlPasteValues, , False, False
    .Cells(1).PasteSpecial xlPasteFormats, , False, False
    .Cells(1).Select
    Application.CutCopyMode = False
    On Error Resume Next
    .DrawingObjects.Visible = True
    .DrawingObjects.Delete
    On Error GoTo 0
    End With

    'Publish the sheet to a htm file
    With TempWB.PublishObjects.Add( _
    SourceType:=xlSourceRange, _
    Filename:=TempFile, _
    Sheet:=TempWB.Sheets(1).Name, _
    Source:=TempWB.Sheets(1).UsedRange.Address, _
    HtmlType:=xlHtmlStatic)
    .Publish (True)
    End With

    'Read all data from the htm file into RangetoHTML
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ts = fso.GetFile(TempFile).OpenAsTextStream(1, -2)
    RangetoHTML = ts.readall
    'Set fso = CreateObject("Scripting.FileSystemObject")
    'Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
    'GetBoiler = ts.readall
    ts.Close
    RangetoHTML = Replace(RangetoHTML, "align=center x:publishsource=", _
    "align=left x:publishsource=")

    'Close TempWB
    TempWB.Close savechanges:=False

    'Delete the htm file we used in this function
    Kill TempFile
    Set ts = Nothing
    Set fso = Nothing
    Set TempWB = Nothing
    End Function
    ...............................................................................................................................

    4] Function:
    Function GetBoiler(ByVal sFile As String) As String
    '**** Kusleika
    Dim fso As Object
    Dim ts As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
    GetBoiler = ts.readall
    ts.Close
    End Function

    PS:
    I think I will be able to get the desired result these codes are modified/corrected in a proper way ..Awaiting Reply ..
    Chao!!

  12. #12
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Thanks for replying ..I appreciate ..I am still gettin the same error:

  13. #13
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi nuttycongo123,

    Can you please edit your last post to...?
    1) use code tags around your code.
    2) supply a link to the specific webpage of Ron DeBruin's that you copied the code from.
    3) upload an attachment with what you have tried so far.
    4) include more specific questions & details about the exact problems you are having.

    Based on the attachment in the first post I have some suggestions:
    - remove Merged Cells from your spreadsheet because they can cause all sorts of problems. A similar visual impact can be achieved by selecting the group of unmerged cells, pressing [ctrl + 1], choosing the Alignment tab and changing the dropdown relating to Horizontal to "center across selection".
    - move the code from the worksheet module into a normal module.

    hth
    Rob

  14. #14
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi,

    I'd love to help, once you've edited the earlier post as requested, but some more detail would be useful ie
    What line of code is highlighted if you click debug when the error message pops up?
    Rob

  15. #15
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob,
    I am getting the same error .Lines are:
    Set OutApp = CreateObject("Outlook.Application")
    .Body = "Hi Alis," & "vbNewline" & "This is to update your account status with us." & "vbNewline" & "Todays position is:" & 'vbNewline"

  16. #16
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    howdy,

    Can you please complete the requests I made in my earlier post?
    I think these will make the thread more user friendly.

    If you need some more explanation, see Rule three which explains how to add code tags to your earlier post. This will make your post easier to read.

    Rob

  17. #17
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Red face Re: outlook 2007 automation

    Dear Rob ,
    I have used your earlier input but i got the same error " Type mismatch".I am sorry not to have wraped the code ..Here they are all of them .Also is the links I have used to get these codes .My codes below are mangled as i tried to work with them and failed ..attached is the plain excel sheet explaining the concept again ( i hope )

    Code 1: Suggested by Gaiden,and amended as per your suggestion .

    Please Login or Register  to view this content.
    Procedures:

    Please Login or Register  to view this content.
    2] Procedure:

    'To use the code that is presented in this section, first create a table on the active sheet with the following columns:

    '* Column A: Names of the people

    '* Column B: E-mail addresses

    '* Column C: yes or no ( if the value is yes, an e-mail message is created)

    'The following subroutine loops through each row on the active sheet and, if there is an e-mail address in column B and Yes in column C, an e-mail message for each person listed in column A is created that has a reminder



    Please Login or Register  to view this content.
    3// Functions:
    Please Login or Register  to view this content.
    .................................................................................................... ...........................

    4] Function:
    Please Login or Register  to view this content.

    Links:

    http://www.rondebruin.nl/sendmail.htm
    http://www.rondebruin.nl/mail/importcontacts.htm
    http://www.rondebruin.nl/mail/folder3/signature.htm
    http://www.rondebruin.nl/mail/tips2.htm
    http://www.rondebruin.nl/mail/folder3/row2.htm
    I hope this helps
    I am not able to get the original file i worked on as i deleted all in frustration ...
    Attached Files Attached Files

  18. #18
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob ,
    When I try the code:
    Please Login or Register  to view this content.
    I get error with the line .Body = .Body & Range("f1:h2").Cells .This is when I run it with the sheet I just attached..

  19. #19
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob ,
    attached is the Excel Sheet .I think this explains better What I am looking for ...Sorry for being so fussy ...
    Attached Files Attached Files

  20. #20
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    Thanks Nutty,

    I'll post something in a while...

    Rob

  21. #21
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi Nutty,

    You're on the right track, I think you just needed to slow down & read through the links you included. It's too late to stop your frustration but here's a helping hand

    Here's a file with some small modifications in the code that created an email for me - you'll need to amend the ranges to get the correct data coming through & you could also identify the recipient's name in the initial part of the email string using a cell value plus add a signature*.

    *the important parts are
    Please Login or Register  to view this content.
    Give it a go, let us know if you have any problems & see if you can spot my small changes


    hth
    Rob
    Attached Files Attached Files

  22. #22
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob ,
    First of all let me take this opportunity to express my gratitude for all your help and
    thanks for the latest input ...I am gettin somewhere with ur help ...Still I have following problems :
    Latest Queries Pending)
    1/ To put Table in the body of E mail after initial reference to the account : :
    Eg For Alex Current Position is different from Joe so on and so forth
    Note 1: Heading has to be retained in all the e mail bodies:
    Note2: I am losing the format of the table when copying the table to body of e mail .

    2/ Insert My signature after the e mail body .
    3/ Include Cc and Bcc in all the e mails
    4/ Replace Yes with Active ,and No with Blocked in Cell E ,which strangly I am not able to do ..
    5/ Link :http://www.rondebruin.nl/mail/folder3/message.htm
    Please Login or Register  to view this content.
    I have uploaded the file for reference ..
    Regards
    Alok
    Attached Files Attached Files

  23. #23
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    HTML Code: 
    Correction:Note 1: Heading has to be retained in all the tables picked up from Excel file.

  24. #24
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: outlook 2007 automation


  25. #25
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    I guess the final code should read Like this
    Please Login or Register  to view this content.
    Problem Area:

    I am not able to resolve the ...is this correct to copy the table in the body of the e mail.

    HTML Code: 
    ..Awaiting inputs ..
    Regards

  26. #26
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob,
    I am able to resolve the problem upto some extent using the following code.I managed to generate E mail in the desired format .Now I am left with following queries:
    1/ I am not able to change the account position in relation to names in the table:Eg For Alex Current Position is :
    HTML Code: 
    and for Joe ,It should copy as
    HTML Code: 
    which is not happening i am getting Alex's table even in Joe's e mail ,
    and I am still I am losing the format of the table when copying the table to body of e mail .
    2/ Insert My signature after the e mail body .
    3/ Include Cc and Bcc in all the e mails
    4/ Replace Yes with Active ,and No with Blocked
    in Cell E ,which strangly I am not able to do ..




    Please Login or Register  to view this content.
    Please advice
    Regards

  27. #27
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi nuttycongo123

    I've been following your thread(s) for several days and haven't jumped in because you're in good hands with Rob. I see he's off line and thought I'd offer a revision of his code. Try the attached.

    I'm not certain what this means
    4/ Replace Yes with Active ,and No with Blocked
    or what it has to do with anything. Let me know what this is about. It's probably easily handled.

    There are formating issues. Let us know of others. Hope you don't mind Rob.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  28. #28
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Dear jaslake,
    Thanks fr assisting .This works but with following problems.
    1/I still lose the format of the table .Thw boderline are not prominently comin up
    2/ Can you assist integrating my signature in the E mail or do I simply Replace it with "Nuttycongo" in the code.
    3/ Yes= Account Is "Active"
    and No= Account is "Blocked".
    4/I want to replace Active/Blocked with yes/No in the active sheet as thats how it is formatted ,but when I am changing "Yes" to "Active" in the code and worksheet it seems not to work ..
    @ Rob it's you who prompted me to explore all the way till here ...i wud have given up but for you ...I am still slogging to solve ...Off course with help from all of thre Guys in the forum ..

    Cheers and many thanks ...

  29. #29
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    @ trucker10
    Mate ...I will look it up ...
    Many Thanks

  30. #30
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi nuttycongo123

    The attached addresses these issues
    1/I still lose the format of the table .The borderline are not prominently coming up
    2/ Can you assist integrating my signature in the E mail or do I simply Replace it with "Nuttycongo" in the code.
    3/ Yes= Account Is "Active"
    and No= Account is "Blocked".
    4/I want to replace Active/Blocked with yes/No in the active sheet as thats how it is formatted ,but when I am changing "Yes" to "Active" in the code and worksheet it seems not to work ..
    You'll need to change this line of code to insert your signature
    Please Login or Register  to view this content.
    Look at the link to see how to do that. If you're unable to sort it out, let us know.
    Attached Files Attached Files

  31. #31
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    Thanks John - don't worry about me, I'm a bit slow off the mark today. I think I'll throw an array approach into the mix shortly
    Let's see if we can get Alok sorted before post number 35...

    Alok,
    Yay, we'll get you there!
    I'm pleased you worked out that you had extra appostrophes around the call to the RangeToHTML function

    Rob

  32. #32
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Rob

    Since you're "back in business", I'll bow out unless I see something obvious. I've always appreciated your help. Nice working with you again.

  33. #33
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi John,

    Nice working with you too, don't bow out though, it's my turn for that - I should be asleep!
    btw, this is post #33, can we solve it by #35?

    Here's a slight variation:
    Please Login or Register  to view this content.
    good night

  34. #34
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Rob

    Past my bedtime too. Don't get hung up on Post #35...remember this?
    I want to send e mails to all the names in Column A,and with E mails in Column B:C:D:E .Imported from the outlook contact list
    Don't quite know what it means...could be a language thing...scares the H*** outa me.

    The array is a nice touch...haven't tested it as I assume you did.

    Goodnight.

  35. #35
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Guys,
    I appreciate your concern with he task ..I am really sorry to have kept u awake past your bedtime John..and Rob I think post 35 is well within your reach ..I have tried your latest code but it fails to detect "Workbooks.Open Filename:="C:\Users\Alok\Desktop\Revised Nutty v5.xls".Any Clue ..
    Regards

  36. #36
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob ,
    I am almost there,thanks to you and John ...I have formulated a code to hide table deficiencies (it's the only way i could have jiggled around considering my limited/ no knowledge of VB ...I am also attaching a sheet I want to format with the code provided by you ..for modification ...
    Attached Files Attached Files

  37. #37
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob,
    Here is the code I modified ..to hide table abnormalities..
    Please Login or Register  to view this content.
    it's just a short cut as i have little time left now ..also attaching the sheet for you to review.

    PS: I am not able to run the codes provided in @ 33 as i am not able to locate the workbook ..any inputs ...
    Regards
    Attached Files Attached Files

  38. #38
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi Nutty,

    I'm off for a run now but I'm confused...

    Quote Originally Posted by nuttycongo123 View Post
    ..I have tried your latest code but it fails to detect "Workbooks.Open Filename:="C:\Users\Alok\Desktop\Revised Nutty v5.xls".Any Clue ..
    Regards
    Maybe I'm going blind , but I can't see this code in the code I provided (esp not in the code that I uploaded as post 33) & I'm reasonably sure that neither Jaslake or I have provided any code that includes a "workbooks.open statement in this context...
    Can you please check where you got the above line of code from?
    Also, to help your understanding, what do you think that line of code is trying to do (& therefore, what may make it cause an error & therefore how could you fix it (if it is needed)?)?


    I'm also a little unhappy...
    Quote Originally Posted by nuttycongo123 View Post
    Hey Rob ,
    I am almost there,thanks to you and John ...I have formulated a code to hide table deficiencies (it's the only way i could have jiggled around considering my limited/ no knowledge of VB ...I am also attaching a sheet I want to format with the code provided by you ..for modification ...
    I'm pleased we've helped you so far, but I like to help people learn, not do all the work for them. There was a point in time where I had no knowledge of vba too. I believe the best way to learn is to experience
    There is no code in the "Nutty12.xls" workbook which suggests you haven't attempted to modify any code yourself.

    E MAIL PRORERTIES
    Properties:
    1ST E MAIL FROM JOE TO LEE
    2ND E MAIL FROMD: ALEX TO JAY
    3RD E MAIL FROM:MANDY TO RAM
    source: http://www.excelforum.com/2461428-post36.html
    I'm not keen on this, this is starting to look like a Spamming tool to me

    I think I've given plenty of help, but you need to try & modify the code for your latest format. To understand what is going on in the code*:
    * (in the normal macro because we can consider that the "RangeToHTML" function works without being modified - or, at this stage, even understood - it just works (perhaps come back to it in 6 months when you have some more knowledge )
    - press [F8] to go through it line by line,
    - each time it highlights a line yellow & you don't understand what that line of code is going to do, double click on a word in that line of code & press [F1].
    - if the Help files don't help, try a Google search to improve your understanding.
    - once you understand what the code is doing, you will find it much easier to modify yourself.
    - if you still have problems, let us know...


    hth
    Rob

  39. #39
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Dear Rob,
    I greatly appreciate your feedback .Yes you are right i did not put any code in nutty12 coz i am modifying it as per the work requirement but I am taking too much of time myself due to lack of know how .I was wrong in asking you to do it for me and i am sorry for that .let me try to do it my self first.I will miss this deadline but thats alright as I have learned to come this far and thats enough reward for me for this time around..I am not a spamer .This is a work requirement, I work in accounts receivables ,and i need to send atlest 150 -200 e mails in a day to companies that owe us money.I was thinking if i could get in the first trigger e mail fast to them this would give me sufficient time to reconcile accounts and do other meaningful activities.I have been learning VB for the past week or so only through this forum.I also went through books on VBA but all of it is greek to me at the moment ...Well thats about it ..This forum has been a teacher and a resource for me and i appreciate contributions from you and John...I am once again sorry if you have felt the way you have ...No excuses from my side I will do it myself and post the codes for you all wonderful guys to correct/amend ..no hard feelings ..
    Regards

  40. #40
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Dear Rob,
    The post I was referring to is @ 30 by John and in attachment ;code you will find "C:\Documents and Settings\Administrator\Desktop\nuttycongo123\Revised Nutty v3.xls"..
    Cheers..

  41. #41
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Quote Originally Posted by jaslake View Post
    Hi nuttycongo123

    The attached addresses these issues
    You'll need to change this line of code to insert your signature
    Please Login or Register  to view this content.
    Look at the link to see how to do that. If you're unable to sort it out, let us know.
    Hey John I have managed to solve the Yes to Active ..transition in the code ,and it works fine,signature can wait and as far as formating goes I still have the "ignore" option as I will take time to understand it ..
    ...Thank you ..
    Regards..

  42. #42
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi Nutty,

    I apologise for the bluntness of my last post - no hard feelings...?

    I'm back from my run & in a much better mood - thanks for taking the time to politely respond to my rant

    I have been playing in & with vba for five or so years, so it is easier for me to forget (no excuse though ) how foreign it first appeared to me too.

    What concerns me about potential spam, is that it seems you are trying to send emails with a variety of signatures, why don't they all have one signature?

    I really hope I haven't put you off, and that you do get "bitten by the vba bug"!
    The automation that is possible with vba is is great for enabling us to spend our time doing more meaningful activities - the bug shows up when you get to a stage where you would rather be doing/improving an automation task than the meaningful activities

    Ahh, "macro1" in module 2 of the file that John attached to post 30. Sorry, I missed that one. It looks like a recorded macro & it could be made a LOT more streamlined. For example, that workbooks.open line of code could be deleted because I think it is meant to relate to the file that you are actually working in. Are you are using that code for formatting?
    If so, would you like to post it & I/we can make some improvements with explanations for you to learn from?


    btw, the code that I posted in post 33 is more efficient because of the array technique but it is harder to understand/explain. The efficiency is due to the fact that it interacts with the spreadsheet fewer times by taking the data into a ("in memory") vba array once, before the looping. This can have quite an impact on speed if you have a lot of rows to loop through. Actually, it could still be improved a fair bit...

    Here are some links (to list of links) which may help you on your journey of self-guided discovery into the joys of vba:
    http://www.excelforum.com/1870870-post2.html
    http://www.mvps.org/links.html#Excel


    Anyway, I'm off to bed now, otherwise I won't feel like getting up for work tomorrow. I don't check the Forum during work hours but I'll check this thread when I get home tomorrow night.

    Goodluck!
    Rob

  43. #43
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Rob and Nutty

    The "workbooks.open statement" was in the original file in Module2 that Nutty posted. It appears to be a procedure that formats the worksheet and then copies/saves to a new version. I see no direct application to the immediate issue.

    I agree with the approach you've taken, Rob. Nutty will get much more personal satisfaction from "trying" to work through issues.

    Again Rob, I don't want to interject myself...I've worked "a lot" with Ron De Bruin's code, modifying it for different OP's. If you wish, I'll continue following the Thread and offering my input. I don't work at a real job...retired after 50 years...do this for fun and mental exercise.

  44. #44
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Dear Rob,
    Please find attached ...I hope I explains all
    Regards
    Attached Files Attached Files

  45. #45
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    Quote Originally Posted by jaslake View Post
    ...Again Rob, I don't want to interject myself...I've worked "a lot" with Ron De Bruin's code, modifying it for different OP's. If you wish, I'll continue following the Thread and offering my input. I don't work at a real job...retired after 50 years...do this for fun and mental exercise.
    hi John,

    Yes, please do keep offering input, I never intended (& I don't want) to "claim ownership" of the thread. We can be on line at different (or the same) times and each of us is able help Nutty out. I'm happy for it to be a case of "first in, first to help"
    - It may be slightly confusing for Nutty, but he can learn more & we can be flexible to respond to his questions.


    Rob

  46. #46
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Guys,

    what's wrong with this code :This shows as an error when I am tryin to run the entire code .I am trying to figure out the changes between two work Sheets/ work Books ...and I am in office so I cant be on line for Long ..but I am still working on my original project ...
    Please Login or Register  to view this content.
    I am not able to Run It the complete code is :
    Please Login or Register  to view this content.
    I am attaching the sheet (format) I want to compare .Please dont mind but I have deleted the values as the data is sensitive

    Regards
    Last edited by nuttycongo123; 02-03-2011 at 01:50 PM.

  47. #47
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi Nutty,

    I'm having a look at post 46 now & will reply soon.

    -------------

    Thanks for explaining the need for multiple signatures to me - I understand why you want to automate it. Having 319 accounts to take care of, must mean that there are times where you spend the day emailing & end up feeling as if you haven't achieved anything meaningful. I imagine that once this is up & running your days as a Collector will be so different

    I know you've done a lot of work to understand the code John & I have posted, but have you had a chance to look at the link that Trucker10 provided in post 24?
    I had a glance the other day, & it may be just what you need...

    The code you uploaded in post 44 looks good to me
    For your other file formats (I think!) it should be just a case of changing the numbers in the "cell.offset..." sections & the R1/R2 ranges to pick up the correct info.
    How's it coming along?

    Rob

  48. #48
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi Nutty,

    What line errors in post 46 & what is the error message?

    Rob

  49. #49
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    It says runtime Error 9 subscription out of range ..
    and the error highlight is

    HTML Code: 
    Regards

  50. #50
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    Phew - I think this is an easy one

    That error means that something you are trying to refer to, doesn't exist.

    In the file you uploaded there is a space in the sheet name ie "sheet 1", whereas the code is looking for "CompareWorksheets ActiveWorkbook.Worksheets("Sheet1")..." which doesn't have a space.

    hth
    Rob

  51. #51
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    @
    HTML Code: 
    hey Rob I hugely appreciate what T10 posted and have gone through it as well ...downloading the temp wont have given me the chance to learn( by now you must have realised how rudimentry my skill level is ...HAHAHA),and even though I was short of time I decided to take a plunge ...and I feel very happy and satisfied now ...the mental stimulation is ...phew !! ...I will get there someday but for now the journey is simple amazing thanks to you ,John .Trucker and this Forum .
    Regards

  52. #52
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Yes I rectifed that ....Thanks..will keep you posted about the outlook project as I will work on it once I gety Home ...
    Regards

  53. #53
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    btw, to save the need for deleting the extra sheets when a workbook is added you can:

    - change the setting in Excel to only create one sheet in each new file which will then become the normal number of sheets in a new file (in excel 2007) by pressing [alt + t + o], choosing Popular (on the left) & then changing "include this many new sheets" to "1".

    or you could change it in code (I found out the initial syntax by recording a macro of the above "manual" approach). Here's the code you could include:

    Please Login or Register  to view this content.
    hth
    Rob

  54. #54
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    YAY! :-)

    I'm pleased you're enjoying it - this makes me laugh though...
    Quote Originally Posted by nuttycongo123 View Post
    ...I will get there someday but for now the journey is simple amazing...
    LOL!
    I'm not laughing because of your skill level - we all started somewhere. I'm laughing because (I think I've mentioned...?) I've been paddling in VBA for about 5 years, & I can easily keep my head above water now but I definitely haven't "got there" yet. I'm still learning every day & you're right - "the journey is simply amazing"

    Good luck
    Rob
    Last edited by broro183; 01-31-2011 at 05:36 PM.

  55. #55
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: outlook 2007 automation

    VBA is just great when you can!
    I stand by my truck and the road
    I followed the thread, good job by Rob and John and yourself nuttycongo123

  56. #56
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    For your other file formats (I think!) it should be just a case of changing the numbers in the "cell.offset..." sections & the R1/R2 ranges to pick up the correct info.
    How's it coming along?

    Rob
    I tried understanding the following code and tried editing it for nutty 12 sheet i am attaching here ,but the code just wont run:
    Please Login or Register  to view this content.
    I am not able to understand the R2 and Cell offset concet .Here is my observations:
    HTML Code: 
    I think I have to learn more abt cell.offset and range ..
    Regards
    Attached Files Attached Files

  57. #57
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: outlook 2007 automation

    a little play with the code
    "<BR>Today's " & Date & " position is: " & cell.Offset(0, 5).Value & "<h3><font color =red > over the limit " & cell.Offset(0, 6).Value & ...................

    Please Login or Register  to view this content.

  58. #58
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Very Intresting input Trucker..I will try am modify the date format to Feb 2nd, 2011 ,will keep you posted ...thanks a ton
    Regards

  59. #59
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Quote Originally Posted by nuttycongo123 View Post
    I tried understanding the following code and tried editing it for nutty 12 sheet i am attaching here ,but the code just wont run:
    Please Login or Register  to view this content.
    I am not able to understand the R2 and Cell offset concet .Here is my observations:
    HTML Code: 
    I think I have to learn more abt cell.offset and range ..
    Regards
    Dear Rob,
    I think the R1/R2 for sheet Nutty 12 will be Set R1 = Range("e1:k1")
    Set R2 = cell.Offset(0, 8).Resize(1, 7)
    Set rng = Union(R1, R2)
    ..
    Regards

  60. #60
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    This quote just wont run ...hmm No error msg either
    Please Login or Register  to view this content.
    I am tryin to run it with Nutty 12 which is attached
    any advices ..Rob
    Attached Files Attached Files

  61. #61
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Nutty

    What ever utility you're using to create Nutty 12 is not formatting Columns L and N correctly. These columns "Drive" the entire procedure. For example, Column L, "Active" evaluates to "Active ". I don't know what's wrong with Column N.

    To fix this, change these lines of code from
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    The Nutty 12 file in Post 60...is it the Final" version? If so, I'll make the modifications to the code for this file.

    PS: we're without power today and I'm running on generator...so, there may be breaks on my activity.

  62. #62
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Nutty

    I thought I'd better work on this while I could. Attached is Nutty 12 Post 60 with the code modified. See if it works for you.
    Attached Files Attached Files

  63. #63
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi all,

    Sorry, I don't think I'm going to be able to spend much time on this tonight. My below comments are more technically minded than most of Nutty's recent questions but I deceided to throw it into the mix for John

    John, this is untested but I think your suggestion in post 61 can be shortened from:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    hth
    Rob

  64. #64
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: outlook 2007 automation

    I'm placed the body text for the email into sheet " body" .
    You can change the text if you want to modify it without change the code .

    The code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by trucker10; 02-01-2011 at 05:21 PM.

  65. #65
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Nutty, trucker10 and Rob

    We're working at cross purposes here. It appears we're giving solutions for outdated workbooks.

    Currently, some of us are providing code for different versions of the workbook. Doesn't work for me. Doesn't work for Nutty.

    Nutty, tell me (us) where you wish to go. For the moment, I'm going to step back. Nutty, if you wish to post a "FINAL" copy of your workbook...and let us know it's "FINAL", one of us can provide a solution for you.

  66. #66
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: outlook 2007 automation

    John , i do step back , i'll be waiting .

  67. #67
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    John,Trucker 10 ,Rob,
    Let me explain ...I have huge amount of data that needs to be manipulated and readjusted.There are 6000 Rows of data which keeps on changing on daily basis as these ar financial positions of our clients ...right now the process which you all are helping me through is the 1st part of the entire project .Latest posts by John and Trucker are really helpful coz they provide immense data management scope.John I will be around for a long time on this forum ... I am learning just by looking/editing/and committing mistakes .in the codes provided by you guys .I am really thankful for all your help ...but I am afraid the entire Journey is going to be long one for all of us ...Regards to all ..

  68. #68
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Nutty

    I've been on many journeys in my 70 years...I know they can be long and tortuous. I also know that moving targets are hard to hit. Only you can decide what you want. Define your final product...we can then offer solutions.

    Do you know your target? If so, please show us; we'll help you to write the code. If the target changes from day to day, you'll lose me.

  69. #69
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Do you know your target? If so, please show us; we'll help you to write the code. If the target changes from day to day, you'll lose me
    .

    Dear John ,
    I understand and I respect your opinion..let me try to explain ..Its a challange as data its self provides endless scope of interpretation,it would be sad to lose you due to so much variations ...I can understand ...your contrbution till now has been immense.I am doing this for no purpose of mine It is just to see if I can addd some value to the process,It's a badly managed government enterprise and there is no ownership.I tend to gain little knowledge and also the unconditional support and friendship of all you wonderful guys .We may never meet, see, or hear from each other ,but just to share the thought process and be partners in the journey is a previlage for me .I am not a rocket scientist ,but now at least i feel that I can learn .. when I read and try to understand the code you guys / write/ edit /support.It has given me hope as now slowly codes hav started to be my friends ,I understand them a bit when i look at them ,all you guys have made it so familiar for me .. and that is all that matters to me ...i am learning even I may advice people someday like you guys do ,but then I now know that my journey is possible ...and you are the guys who make me feel that way ..Attached is the file for you to see, I tried to explain what ever I can ...a small attempt from me to keep you intrested in the Team ...
    Many thanks and Regards
    Last edited by nuttycongo123; 02-03-2011 at 01:50 PM.

  70. #70
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Dear John and trucker 10 ,
    Find attached the latest working I combined both the codes and this is the final ouput ...I still can't figure out
    1/ how to put space between "Dear" and "Name".in HTMl
    2/ Trucker i think Over limit shoud fetch the value as you rightly did in your earlier post sheet was nutty 4 i think ..but it is not comin up in this version ..
    I have to rush for work now will try and sort out if I find time ...Thanks guys ..will keep you posted with updates and development ..
    @ Rob ...haven't heard from you I hope all is well with you too..take care everone and
    many Thanks once again ..
    Ps: John I will try and give you more inputs today ,just to keep you intrested ..
    regards
    Attached Files Attached Files

  71. #71
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: outlook 2007 automation

    Hi Nutty ,

    You can test it , take a look into the sheet .
    Attached Files Attached Files

  72. #72
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: outlook 2007 automation

    hi Nutty,

    Yes all is well, I'm concentrating on some of my own work at the moment - learning to code/query efficiently & effectively in MS Access. Plus I'm off skiing this weekend so I won't be around to help out for awhile. I think all the solutions are somewhere in the thread & the others have it under control.

    John has a very good point that "moving targets are hard to hit" (unless of course you know where it is moving to!).

    Keep working hard to understand the code because ultimately the entire journey is yours & yours alone...
    Brief focused questions (seems good recently) are the best to ensure we give you what you need & more importantly, the effort that it takes you to "focus" your questions should help your learning. Just the process of creating an appropriate question may lead you to the answer yourself - keep working hard to understand


    Goodluck :-)

    Rob

  73. #73
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Quote Originally Posted by trucker10 View Post
    Hi Nutty ,

    You can test it , take a look into the sheet .
    Thats amazing ..Thanks mate ...One more question why do you code cell as
    " eCell.Offset" ..many thanks ..

  74. #74
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hey Rob ..good to hear from you,goodluck to you to for your project ...Enjoy your weekend ..Regards

  75. #75
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: outlook 2007 automation

    Nutti , the code eRng and eCell was from ??? but its work also without eRng , eCell > just Rng , Cell , why we use eRng or eCell .
    read it easier

    Please Login or Register  to view this content.

  76. #76
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Quote Originally Posted by jaslake View Post
    Hi Nutty

    I've been on many journeys in my 70 years...I know they can be long and tortuous. I also know that moving targets are hard to hit. Only you can decide what you want. Define your final product...we can then offer solutions.

    Do you know your target? If so, please show us; we'll help you to write the code. If the target changes from day to day, you'll lose me.
    Hey john I found a code you posted in 2009 for excel - outlook contact update ...and it ran as
    Please Login or Register  to view this content.
    do you have a worksheet l that can explain what this code does ...
    I have to automate the contacts list in order to run along with the codes we all have been working on ..please advise

  77. #77
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi Nutty

    Send me a link to where you found the code you referred to
    I found a code you posted in 2009 for excel - outlook contact update
    ...I MAY have a copy of the actual file in a buried backup.

  78. #78
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Hello J,
    I also have a new problem ...Attached is the excel sheet and it is a statement of account ,i.e bills i have to receive and bills I have to pay ..Now I need your help in setting off the invoices against each other in a best possible way ..Rule invoices should look to knock off with each other and return a value = 0 ,if not possible they should return the next closest value ..The main aim is to clean the mess (invoices) more the better ...John I have two 3 assignments where I need your help ...is it possible for you to devote some time ...Details are :

    1/ Comparision Of two Excel sheets
    2/ Formating the outcome in a specific way to deliver a summary report ..
    Regards
    Attached Files Attached Files

  79. #79
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi nuttycongo123

    The thread you posted as a link deals with updating Outlook Contacts from Excel...how does that relate to this thread?

    I also have a new problem ...Attached is the excel sheet and it is a statement of account ,i.e bills i have to receive and bills I have to pay ..Now I need your help in setting off the invoices against each other in a best possible way ..Rule invoices should look to knock off with each other and return a value = 0 ,if not possible they should return the next closest value
    These issues both appear to be new issues unrelated to this thread. I believe you'll need to start new threads for these issues. If you wish to PM me when you've done so, I'll be glad to look at them with you.

  80. #80
    Forum Contributor nuttycongo123's Avatar
    Join Date
    01-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: outlook 2007 automation

    Quote Originally Posted by jaslake View Post
    Hi nuttycongo123

    The thread you posted as a link deals with updating Outlook Contacts from Excel...how does that relate to this thread?



    These issues both appear to be new issues unrelated to this thread. I believe you'll need to start new threads for these issues. If you wish to PM me when you've done so, I'll be glad to look at them with you.
    Dear J ,
    I can use the following code to creat distribution list for my customers also ...Like I have 325 customers in my portfolio and I can creat a distribution list ...When I am tryin to run this code ...it's not executing ...can u advice .. and hey I never tried to hijack the thread it's just that i wrongly posted ...next time on i will be extra careful..

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Hope this helps someone.

    John[/QUOTE]
    Last edited by nuttycongo123; 02-03-2011 at 07:45 AM. Reason: wrong spelling

  81. #81
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: outlook 2007 automation

    Hi nuttycongo123

    As I said previously, this issue appears to be a new issue and should probably be the subject of a new thread.

    However, to directly answer your question, unless your data file has the same structure as the data file for which this code was written, I'd expect it to not execute.

    One can't simply plug code into a workbook and expect it to run...the code would need to be modified to deal with the structure of the workbook. Sometimes that's rather easy...often, it's easier to start from scratch. I know the structure of the workbook for which this code was written. It's highly unlikely the structure of your file even remotely resembles my file. Starting from scratch would probably be your best approach.

    PS: should you start a new thread, provide a link to other threads that you feel are appropriate to your issue.
    Last edited by jaslake; 02-03-2011 at 01:23 PM. Reason: add PS

  82. #82
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: outlook 2007 automation

    Not sure if this is the same issue from when this first started but i have 2 codes here.

    the first is for your default email program (i'm using thunderbird)

    Please Login or Register  to view this content.
    the second is for outlook only although i have not tested it.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1