Windows Vista Forums

Excel pop3 issue

  1. #1


    SammyL Guest

    Excel pop3 issue

    Hi All,

    I am using a vbs to create an excel file from sql data, I then add and
    run a macro to format the excel, and then remove the macro using
    "xlbook.VBProject.VBComponents.Remove
    xlbook.VBProject.VBComponents("Module1") " in order to send the users
    a clean excel without the macro. When the user tries to download using
    pop3 it results in an error and the file cannot download. There seems
    to be something remaining in the file after removing the macro that is
    causing it to drive pop3 crazy. it seems that there is remnant of the
    macro after removal.

    If i skip creation of the macro i can send successfully, but the users
    need it formatted.

    I also tried formatting from vbs, such as
    xlapp.ActiveSheet.PageSetup.Orientation = xlapp.xlLandScape and keep
    getting an error that i cannot set the properties.
    Please help!



      My System SpecsSystem Spec

  2. #2


    Tom Lavedas Guest

    Re: Excel pop3 issue

    On May 5, 2:53*pm, SammyL <sam...@newsgroup> wrote:

    > Hi All,
    >
    > I am using a vbs to create an excel file from sql data, I then add and
    > run a macro to format the excel, *and then remove the macro using
    > "xlbook.VBProject.VBComponents.Remove
    > xlbook.VBProject.VBComponents("Module1") " in order to send the users
    > a clean excel without the macro. When the user tries to download using
    > pop3 it results in an error and the file cannot download. There seems
    > to be something remaining in the file after removing the macro that is
    > causing it to drive pop3 crazy. it seems that there is remnant of the
    > macro after removal.
    >
    > If i skip creation of the macro i can send successfully, but the users
    > need it formatted.
    >
    > I also tried formatting from vbs, such as
    > xlapp.ActiveSheet.PageSetup.Orientation = xlapp.xlLandScape and keep
    > getting an error that i cannot set the properties.
    > Please help!
    The xLwhatever constants cannot be accessed (at least not easily) from
    a VBScript. Rather, their value needs to be hard coded into your
    script. For example, add the definition for the xlLandScape in your
    script and drop the object preface ...

    Const xlLandScape = 2
    xlapp.ActiveSheet.PageSetup.Orientation = xlLandScape

    Do similar for all of the other xl constants and your script should be
    able to do all of the formatting without resorting to calling an Excel
    macro.
    _____________________
    Tom Lavedas

      My System SpecsSystem Spec

Excel pop3 issue

Similar Threads
Thread Forum
hello i am having an issue,excel and powerpoint
Hello any one who can help. I received a PowerPoint presentation via e-mail. I can open and read all the data in the document, but I cannot...
Software
running Excel Macro in in specified Excel files in spe
I have created a macro that works perfectly. I have to run that macro for 2000 employees. Can anyone help me to create a process to run this ...
PowerShell
create Excel spreadsheet without loading Excel
Greetings, I have a script which uses CreateObject("Excel.Application") to create a spreadsheet. This works fine on my machine since I have Excel...
VB Script
Solution for stdole32 issue with excel and vista
This may not sound very scientific, but after hundreds of wasted hours of searching and experimenting, here is what I did and it works ! 1....
Vista General
How to view Excel document without Microsoft Office Excel installe
I bought new PC of Vista Home edition. I can't view a Excel made document that was sent to me by friend because my new visa PC has no Microsoft...
Vista General
Vista ASP.NET 2.0 Cannot open Excel File using Microsoft.Excel 12.0 COM object
I am using an ASP.NET 2.0 web application using the Interop assembly pointing to the Microsoft.Excel 12.0 COM to open and write to a spreadsheet. ...
Software
Outlook 2003 and Windows Mail POP3 issue
Hi, I've been struggling to get either of these to download from my POP3 provider. It seems that the download process gets part of the way. It...
Vista mail