+ Reply to Thread
Results 1 to 9 of 9

Email Macro Late Binding

  1. #1
    Jan Holmstrom
    Guest

    Email Macro Late Binding

    When using the late binding method (Ron de Bruin), the Outlook warning is
    not shown on top of the screen. But it is hidden behind the Active Sheet.
    This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    down the excelfile.

    It works when I use ".Display" instead of ".Send". But I would like the
    macro to run the whole sequense with no manuel interferrence.

    I do not have the problem when I use the "Early Binding" method. But I need
    to use Late Binding as I do not know the excelversion, the receivers of my
    program have.

    This is the contens of the macro:

    Sub saveprintsend()

    ' saveprintsend Macro

    ' Macro recorded 02-06-2005 by Holmstrom

    ActiveWorkbook.Save
    ActiveWorkbook.Printout
    Dim OutApp As Object
    Dim OutMail As Object
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
    With OutMail
    .To = "[email protected]"
    .CC = ""
    .BCC = ""
    .Subject = "ENERGY USE REPORT"
    .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    .Attachments.Add ActiveWorkbook.FullName
    .Send
    End With
    Set OutMail = Nothing
    Set OutApp = Nothing
    Application.DisplayAlerts = False
    Application.Quit
    End Sub

    If you can help me on this I will be extremely joyfull.

    Thanks in advance and best wishes



  2. #2
    Ron de Bruin
    Guest

    Re: Email Macro Late Binding

    Hi Jan

    I will test it this evening for you but I can't remember seeing this problem

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    > not shown on top of the screen. But it is hidden behind the Active Sheet.
    > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    > down the excelfile.
    >
    > It works when I use ".Display" instead of ".Send". But I would like the
    > macro to run the whole sequense with no manuel interferrence.
    >
    > I do not have the problem when I use the "Early Binding" method. But I need
    > to use Late Binding as I do not know the excelversion, the receivers of my
    > program have.
    >
    > This is the contens of the macro:
    >
    > Sub saveprintsend()
    >
    > ' saveprintsend Macro
    >
    > ' Macro recorded 02-06-2005 by Holmstrom
    >
    > ActiveWorkbook.Save
    > ActiveWorkbook.Printout
    > Dim OutApp As Object
    > Dim OutMail As Object
    > Set OutApp = CreateObject("Outlook.Application")
    > Set OutMail = OutApp.CreateItem(0)
    > With OutMail
    > .To = "[email protected]"
    > .CC = ""
    > .BCC = ""
    > .Subject = "ENERGY USE REPORT"
    > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    > .Attachments.Add ActiveWorkbook.FullName
    > .Send
    > End With
    > Set OutMail = Nothing
    > Set OutApp = Nothing
    > Application.DisplayAlerts = False
    > Application.Quit
    > End Sub
    >
    > If you can help me on this - I will be extremely joyfull.
    >
    > Thanks in advance and best wishes
    >
    >




  3. #3
    Jan Holmstrom
    Guest

    Re: Email Macro Late Binding

    Hi Ron
    Thanks, appriciate that you'll look into it.
    Kind regards
    Jan

    "Ron de Bruin" skrev:

    > Hi Jan
    >
    > I will test it this evening for you but I can't remember seeing this problem
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    > > not shown on top of the screen. But it is hidden behind the Active Sheet.
    > > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    > > down the excelfile.
    > >
    > > It works when I use ".Display" instead of ".Send". But I would like the
    > > macro to run the whole sequense with no manuel interferrence.
    > >
    > > I do not have the problem when I use the "Early Binding" method. But I need
    > > to use Late Binding as I do not know the excelversion, the receivers of my
    > > program have.
    > >
    > > This is the contens of the macro:
    > >
    > > Sub saveprintsend()
    > >
    > > ' saveprintsend Macro
    > >
    > > ' Macro recorded 02-06-2005 by Holmstrom
    > >
    > > ActiveWorkbook.Save
    > > ActiveWorkbook.Printout
    > > Dim OutApp As Object
    > > Dim OutMail As Object
    > > Set OutApp = CreateObject("Outlook.Application")
    > > Set OutMail = OutApp.CreateItem(0)
    > > With OutMail
    > > .To = "[email protected]"
    > > .CC = ""
    > > .BCC = ""
    > > .Subject = "ENERGY USE REPORT"
    > > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    > > .Attachments.Add ActiveWorkbook.FullName
    > > .Send
    > > End With
    > > Set OutMail = Nothing
    > > Set OutApp = Nothing
    > > Application.DisplayAlerts = False
    > > Application.Quit
    > > End Sub
    > >
    > > If you can help me on this - I will be extremely joyfull.
    > >
    > > Thanks in advance and best wishes
    > >
    > >

    >
    >
    >


  4. #4
    Ron de Bruin
    Guest

    Re: Email Macro Late Binding

    Hi Jan

    I can't repro this on my machine

    If you delete the print line do you have the same problem then.?

    Maybe you can use CDO
    http://www.rondebruin.nl/cdo.htm


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > Hi Ron
    > Thanks, appriciate that you'll look into it.
    > Kind regards
    > Jan
    >
    > "Ron de Bruin" skrev:
    >
    >> Hi Jan
    >>
    >> I will test it this evening for you but I can't remember seeing this problem
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "Jan Holmstrom" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    >> > not shown on top of the screen. But it is hidden behind the Active Sheet.
    >> > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    >> > down the excelfile.
    >> >
    >> > It works when I use ".Display" instead of ".Send". But I would like the
    >> > macro to run the whole sequense with no manuel interferrence.
    >> >
    >> > I do not have the problem when I use the "Early Binding" method. But I need
    >> > to use Late Binding as I do not know the excelversion, the receivers of my
    >> > program have.
    >> >
    >> > This is the contens of the macro:
    >> >
    >> > Sub saveprintsend()
    >> >
    >> > ' saveprintsend Macro
    >> >
    >> > ' Macro recorded 02-06-2005 by Holmstrom
    >> >
    >> > ActiveWorkbook.Save
    >> > ActiveWorkbook.Printout
    >> > Dim OutApp As Object
    >> > Dim OutMail As Object
    >> > Set OutApp = CreateObject("Outlook.Application")
    >> > Set OutMail = OutApp.CreateItem(0)
    >> > With OutMail
    >> > .To = "[email protected]"
    >> > .CC = ""
    >> > .BCC = ""
    >> > .Subject = "ENERGY USE REPORT"
    >> > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    >> > .Attachments.Add ActiveWorkbook.FullName
    >> > .Send
    >> > End With
    >> > Set OutMail = Nothing
    >> > Set OutApp = Nothing
    >> > Application.DisplayAlerts = False
    >> > Application.Quit
    >> > End Sub
    >> >
    >> > If you can help me on this - I will be extremely joyfull.
    >> >
    >> > Thanks in advance and best wishes
    >> >
    >> >

    >>
    >>
    >>




  5. #5
    Jan Holmstrom
    Guest

    Re: Email Macro Late Binding

    Hi Ron,

    It works when I put .printout as last sequense. Strange!!
    Thanks a lot for advice.

    By the way, is it possible to make a macro, which identify the outlook
    version and then set the reference to that?? Then I could use Early Binding.

    By the way whats CDO?? Where can I read about it.

    Best regards
    Jan

    "Ron de Bruin" skrev:

    > Hi Jan
    >
    > I can't repro this on my machine
    >
    > If you delete the print line do you have the same problem then.?
    >
    > Maybe you can use CDO
    > http://www.rondebruin.nl/cdo.htm
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > > Hi Ron
    > > Thanks, appriciate that you'll look into it.
    > > Kind regards
    > > Jan
    > >
    > > "Ron de Bruin" skrev:
    > >
    > >> Hi Jan
    > >>
    > >> I will test it this evening for you but I can't remember seeing this problem
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "Jan Holmstrom" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    > >> > not shown on top of the screen. But it is hidden behind the Active Sheet.
    > >> > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    > >> > down the excelfile.
    > >> >
    > >> > It works when I use ".Display" instead of ".Send". But I would like the
    > >> > macro to run the whole sequense with no manuel interferrence.
    > >> >
    > >> > I do not have the problem when I use the "Early Binding" method. But I need
    > >> > to use Late Binding as I do not know the excelversion, the receivers of my
    > >> > program have.
    > >> >
    > >> > This is the contens of the macro:
    > >> >
    > >> > Sub saveprintsend()
    > >> >
    > >> > ' saveprintsend Macro
    > >> >
    > >> > ' Macro recorded 02-06-2005 by Holmstrom
    > >> >
    > >> > ActiveWorkbook.Save
    > >> > ActiveWorkbook.Printout
    > >> > Dim OutApp As Object
    > >> > Dim OutMail As Object
    > >> > Set OutApp = CreateObject("Outlook.Application")
    > >> > Set OutMail = OutApp.CreateItem(0)
    > >> > With OutMail
    > >> > .To = "[email protected]"
    > >> > .CC = ""
    > >> > .BCC = ""
    > >> > .Subject = "ENERGY USE REPORT"
    > >> > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    > >> > .Attachments.Add ActiveWorkbook.FullName
    > >> > .Send
    > >> > End With
    > >> > Set OutMail = Nothing
    > >> > Set OutApp = Nothing
    > >> > Application.DisplayAlerts = False
    > >> > Application.Quit
    > >> > End Sub
    > >> >
    > >> > If you can help me on this - I will be extremely joyfull.
    > >> >
    > >> > Thanks in advance and best wishes
    > >> >
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    Jan Holmstrom
    Guest

    Re: Email Macro Late Binding

    OOPS.
    I can read about on your homepage - stupid me.
    Sorry

    "Jan Holmstrom" skrev:

    > Hi Ron,
    >
    > It works when I put .printout as last sequense. Strange!!
    > Thanks a lot for advice.
    >
    > By the way, is it possible to make a macro, which identify the outlook
    > version and then set the reference to that?? Then I could use Early Binding.
    >
    > By the way whats CDO?? Where can I read about it.
    >
    > Best regards
    > Jan
    >
    > "Ron de Bruin" skrev:
    >
    > > Hi Jan
    > >
    > > I can't repro this on my machine
    > >
    > > If you delete the print line do you have the same problem then.?
    > >
    > > Maybe you can use CDO
    > > http://www.rondebruin.nl/cdo.htm
    > >
    > >
    > > --
    > > Regards Ron de Bruin
    > > http://www.rondebruin.nl
    > >
    > >
    > > "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > > > Hi Ron
    > > > Thanks, appriciate that you'll look into it.
    > > > Kind regards
    > > > Jan
    > > >
    > > > "Ron de Bruin" skrev:
    > > >
    > > >> Hi Jan
    > > >>
    > > >> I will test it this evening for you but I can't remember seeing this problem
    > > >>
    > > >> --
    > > >> Regards Ron de Bruin
    > > >> http://www.rondebruin.nl
    > > >>
    > > >>
    > > >> "Jan Holmstrom" <[email protected]> wrote in message
    > > >> news:[email protected]...
    > > >> > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    > > >> > not shown on top of the screen. But it is hidden behind the Active Sheet.
    > > >> > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    > > >> > down the excelfile.
    > > >> >
    > > >> > It works when I use ".Display" instead of ".Send". But I would like the
    > > >> > macro to run the whole sequense with no manuel interferrence.
    > > >> >
    > > >> > I do not have the problem when I use the "Early Binding" method. But I need
    > > >> > to use Late Binding as I do not know the excelversion, the receivers of my
    > > >> > program have.
    > > >> >
    > > >> > This is the contens of the macro:
    > > >> >
    > > >> > Sub saveprintsend()
    > > >> >
    > > >> > ' saveprintsend Macro
    > > >> >
    > > >> > ' Macro recorded 02-06-2005 by Holmstrom
    > > >> >
    > > >> > ActiveWorkbook.Save
    > > >> > ActiveWorkbook.Printout
    > > >> > Dim OutApp As Object
    > > >> > Dim OutMail As Object
    > > >> > Set OutApp = CreateObject("Outlook.Application")
    > > >> > Set OutMail = OutApp.CreateItem(0)
    > > >> > With OutMail
    > > >> > .To = "[email protected]"
    > > >> > .CC = ""
    > > >> > .BCC = ""
    > > >> > .Subject = "ENERGY USE REPORT"
    > > >> > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    > > >> > .Attachments.Add ActiveWorkbook.FullName
    > > >> > .Send
    > > >> > End With
    > > >> > Set OutMail = Nothing
    > > >> > Set OutApp = Nothing
    > > >> > Application.DisplayAlerts = False
    > > >> > Application.Quit
    > > >> > End Sub
    > > >> >
    > > >> > If you can help me on this - I will be extremely joyfull.
    > > >> >
    > > >> > Thanks in advance and best wishes
    > > >> >
    > > >> >
    > > >>
    > > >>
    > > >>

    > >
    > >
    > >


  7. #7
    Ron de Bruin
    Guest

    Re: Email Macro Late Binding

    Hi Jan

    > By the way, is it possible to make a macro, which identify the outlook
    > version and then set the reference to that?? Then I could use Early Binding.


    If you create your workbook and set the reference in Excel 2000 your code will work
    in Excel 2000-2003

    > By the way whats CDO?? Where can I read about it.

    Click on the link in my reply


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > Hi Ron,
    >
    > It works when I put .printout as last sequense. Strange!!
    > Thanks a lot for advice.
    >
    > By the way, is it possible to make a macro, which identify the outlook
    > version and then set the reference to that?? Then I could use Early Binding.
    >
    > By the way whats CDO?? Where can I read about it.
    >
    > Best regards
    > Jan
    >
    > "Ron de Bruin" skrev:
    >
    >> Hi Jan
    >>
    >> I can't repro this on my machine
    >>
    >> If you delete the print line do you have the same problem then.?
    >>
    >> Maybe you can use CDO
    >> http://www.rondebruin.nl/cdo.htm
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "Jan Holmstrom" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Hi Ron
    >> > Thanks, appriciate that you'll look into it.
    >> > Kind regards
    >> > Jan
    >> >
    >> > "Ron de Bruin" skrev:
    >> >
    >> >> Hi Jan
    >> >>
    >> >> I will test it this evening for you but I can't remember seeing this problem
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "Jan Holmstrom" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    >> >> > not shown on top of the screen. But it is hidden behind the Active Sheet.
    >> >> > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    >> >> > down the excelfile.
    >> >> >
    >> >> > It works when I use ".Display" instead of ".Send". But I would like the
    >> >> > macro to run the whole sequense with no manuel interferrence.
    >> >> >
    >> >> > I do not have the problem when I use the "Early Binding" method. But I need
    >> >> > to use Late Binding as I do not know the excelversion, the receivers of my
    >> >> > program have.
    >> >> >
    >> >> > This is the contens of the macro:
    >> >> >
    >> >> > Sub saveprintsend()
    >> >> >
    >> >> > ' saveprintsend Macro
    >> >> >
    >> >> > ' Macro recorded 02-06-2005 by Holmstrom
    >> >> >
    >> >> > ActiveWorkbook.Save
    >> >> > ActiveWorkbook.Printout
    >> >> > Dim OutApp As Object
    >> >> > Dim OutMail As Object
    >> >> > Set OutApp = CreateObject("Outlook.Application")
    >> >> > Set OutMail = OutApp.CreateItem(0)
    >> >> > With OutMail
    >> >> > .To = "[email protected]"
    >> >> > .CC = ""
    >> >> > .BCC = ""
    >> >> > .Subject = "ENERGY USE REPORT"
    >> >> > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    >> >> > .Attachments.Add ActiveWorkbook.FullName
    >> >> > .Send
    >> >> > End With
    >> >> > Set OutMail = Nothing
    >> >> > Set OutApp = Nothing
    >> >> > Application.DisplayAlerts = False
    >> >> > Application.Quit
    >> >> > End Sub
    >> >> >
    >> >> > If you can help me on this - I will be extremely joyfull.
    >> >> >
    >> >> > Thanks in advance and best wishes
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  8. #8
    Jan Holmstrom
    Guest

    Re: Email Macro Late Binding

    Hi Ron,
    As I told my self; stupid me: look at the link:-)

    My code is written in excel 2003, in the reference tool box the only version
    I can see is 11 for both Outlook and Excel.

    But as I understand it, then it doesn't matter when I'm using Late Binding.
    Isn't that correct?

    Best regards
    Jan

    "Ron de Bruin" skrev:

    > Hi Jan
    >
    > > By the way, is it possible to make a macro, which identify the outlook
    > > version and then set the reference to that?? Then I could use Early Binding.

    >
    > If you create your workbook and set the reference in Excel 2000 your code will work
    > in Excel 2000-2003
    >
    > > By the way whats CDO?? Where can I read about it.

    > Click on the link in my reply
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > > Hi Ron,
    > >
    > > It works when I put .printout as last sequense. Strange!!
    > > Thanks a lot for advice.
    > >
    > > By the way, is it possible to make a macro, which identify the outlook
    > > version and then set the reference to that?? Then I could use Early Binding.
    > >
    > > By the way whats CDO?? Where can I read about it.
    > >
    > > Best regards
    > > Jan
    > >
    > > "Ron de Bruin" skrev:
    > >
    > >> Hi Jan
    > >>
    > >> I can't repro this on my machine
    > >>
    > >> If you delete the print line do you have the same problem then.?
    > >>
    > >> Maybe you can use CDO
    > >> http://www.rondebruin.nl/cdo.htm
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "Jan Holmstrom" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > Hi Ron
    > >> > Thanks, appriciate that you'll look into it.
    > >> > Kind regards
    > >> > Jan
    > >> >
    > >> > "Ron de Bruin" skrev:
    > >> >
    > >> >> Hi Jan
    > >> >>
    > >> >> I will test it this evening for you but I can't remember seeing this problem
    > >> >>
    > >> >> --
    > >> >> Regards Ron de Bruin
    > >> >> http://www.rondebruin.nl
    > >> >>
    > >> >>
    > >> >> "Jan Holmstrom" <[email protected]> wrote in message
    > >> >> news:[email protected]...
    > >> >> > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    > >> >> > not shown on top of the screen. But it is hidden behind the Active Sheet.
    > >> >> > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    > >> >> > down the excelfile.
    > >> >> >
    > >> >> > It works when I use ".Display" instead of ".Send". But I would like the
    > >> >> > macro to run the whole sequense with no manuel interferrence.
    > >> >> >
    > >> >> > I do not have the problem when I use the "Early Binding" method. But I need
    > >> >> > to use Late Binding as I do not know the excelversion, the receivers of my
    > >> >> > program have.
    > >> >> >
    > >> >> > This is the contens of the macro:
    > >> >> >
    > >> >> > Sub saveprintsend()
    > >> >> >
    > >> >> > ' saveprintsend Macro
    > >> >> >
    > >> >> > ' Macro recorded 02-06-2005 by Holmstrom
    > >> >> >
    > >> >> > ActiveWorkbook.Save
    > >> >> > ActiveWorkbook.Printout
    > >> >> > Dim OutApp As Object
    > >> >> > Dim OutMail As Object
    > >> >> > Set OutApp = CreateObject("Outlook.Application")
    > >> >> > Set OutMail = OutApp.CreateItem(0)
    > >> >> > With OutMail
    > >> >> > .To = "[email protected]"
    > >> >> > .CC = ""
    > >> >> > .BCC = ""
    > >> >> > .Subject = "ENERGY USE REPORT"
    > >> >> > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    > >> >> > .Attachments.Add ActiveWorkbook.FullName
    > >> >> > .Send
    > >> >> > End With
    > >> >> > Set OutMail = Nothing
    > >> >> > Set OutApp = Nothing
    > >> >> > Application.DisplayAlerts = False
    > >> >> > Application.Quit
    > >> >> > End Sub
    > >> >> >
    > >> >> > If you can help me on this - I will be extremely joyfull.
    > >> >> >
    > >> >> > Thanks in advance and best wishes
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  9. #9
    Ron de Bruin
    Guest

    Re: Email Macro Late Binding

    Hi Jan

    > But as I understand it, then it doesn't matter when I'm using Late Binding.
    > Isn't that correct?


    Yes that is correct

    Read this if you want to know more about the difference between late and early binding
    http://www.*****-clicks.com/excel/ol...#Early_Binding


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Jan Holmstrom" <[email protected]> wrote in message news:[email protected]...
    > Hi Ron,
    > As I told my self; stupid me: look at the link:-)
    >
    > My code is written in excel 2003, in the reference tool box the only version
    > I can see is 11 for both Outlook and Excel.
    >
    > But as I understand it, then it doesn't matter when I'm using Late Binding.
    > Isn't that correct?
    >
    > Best regards
    > Jan
    >
    > "Ron de Bruin" skrev:
    >
    >> Hi Jan
    >>
    >> > By the way, is it possible to make a macro, which identify the outlook
    >> > version and then set the reference to that?? Then I could use Early Binding.

    >>
    >> If you create your workbook and set the reference in Excel 2000 your code will work
    >> in Excel 2000-2003
    >>
    >> > By the way whats CDO?? Where can I read about it.

    >> Click on the link in my reply
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "Jan Holmstrom" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Hi Ron,
    >> >
    >> > It works when I put .printout as last sequense. Strange!!
    >> > Thanks a lot for advice.
    >> >
    >> > By the way, is it possible to make a macro, which identify the outlook
    >> > version and then set the reference to that?? Then I could use Early Binding.
    >> >
    >> > By the way whats CDO?? Where can I read about it.
    >> >
    >> > Best regards
    >> > Jan
    >> >
    >> > "Ron de Bruin" skrev:
    >> >
    >> >> Hi Jan
    >> >>
    >> >> I can't repro this on my machine
    >> >>
    >> >> If you delete the print line do you have the same problem then.?
    >> >>
    >> >> Maybe you can use CDO
    >> >> http://www.rondebruin.nl/cdo.htm
    >> >>
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "Jan Holmstrom" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > Hi Ron
    >> >> > Thanks, appriciate that you'll look into it.
    >> >> > Kind regards
    >> >> > Jan
    >> >> >
    >> >> > "Ron de Bruin" skrev:
    >> >> >
    >> >> >> Hi Jan
    >> >> >>
    >> >> >> I will test it this evening for you but I can't remember seeing this problem
    >> >> >>
    >> >> >> --
    >> >> >> Regards Ron de Bruin
    >> >> >> http://www.rondebruin.nl
    >> >> >>
    >> >> >>
    >> >> >> "Jan Holmstrom" <[email protected]> wrote in message
    >> >> >> news:[email protected]...
    >> >> >> > When using the "late binding" method (Ron de Bruin), the Outlook warning is
    >> >> >> > not shown on top of the screen. But it is hidden behind the Active Sheet.
    >> >> >> > This block for the program and I have to use CTRL+ALT+DEL to stop and shut
    >> >> >> > down the excelfile.
    >> >> >> >
    >> >> >> > It works when I use ".Display" instead of ".Send". But I would like the
    >> >> >> > macro to run the whole sequense with no manuel interferrence.
    >> >> >> >
    >> >> >> > I do not have the problem when I use the "Early Binding" method. But I need
    >> >> >> > to use Late Binding as I do not know the excelversion, the receivers of my
    >> >> >> > program have.
    >> >> >> >
    >> >> >> > This is the contens of the macro:
    >> >> >> >
    >> >> >> > Sub saveprintsend()
    >> >> >> >
    >> >> >> > ' saveprintsend Macro
    >> >> >> >
    >> >> >> > ' Macro recorded 02-06-2005 by Holmstrom
    >> >> >> >
    >> >> >> > ActiveWorkbook.Save
    >> >> >> > ActiveWorkbook.Printout
    >> >> >> > Dim OutApp As Object
    >> >> >> > Dim OutMail As Object
    >> >> >> > Set OutApp = CreateObject("Outlook.Application")
    >> >> >> > Set OutMail = OutApp.CreateItem(0)
    >> >> >> > With OutMail
    >> >> >> > .To = "[email protected]"
    >> >> >> > .CC = ""
    >> >> >> > .BCC = ""
    >> >> >> > .Subject = "ENERGY USE REPORT"
    >> >> >> > .Body = "ATTACHED FIND REPORT FROM DOWNMENTIONED"
    >> >> >> > .Attachments.Add ActiveWorkbook.FullName
    >> >> >> > .Send
    >> >> >> > End With
    >> >> >> > Set OutMail = Nothing
    >> >> >> > Set OutApp = Nothing
    >> >> >> > Application.DisplayAlerts = False
    >> >> >> > Application.Quit
    >> >> >> > End Sub
    >> >> >> >
    >> >> >> > If you can help me on this - I will be extremely joyfull.
    >> >> >> >
    >> >> >> > Thanks in advance and best wishes
    >> >> >> >
    >> >> >> >
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




+ 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