none
DDE Printing causes 1001 Error RRS feed

  • Question

  • Hi all,

    I have a Windows Service application (developed in C++) running under Local System account. Operating system is Windows Server 2008 Standard - Service Pack 2 - 32-bit - 4Gb RAM. 

    EDIT: Office 2003 with Service Pack 3.

    This service takes a RTF file and using DDE prints it. However Word fails to perform the print issuing an error (I can see the error if I enable interaction with desktop). The error is 

    "Run-time error '1001':

    There is insufficient memory. Save the document now.
    C:\...\file.rtf"

    A screenshot can be seen here: http://img804.imageshack.us/img804/9550/worderror.png

    Any idea? Suggestions?

     

    Josue Gomes
    www.josuegomes.com 


    Thursday, May 12, 2011 3:18 PM

Answers

  • MS Office was installed and SP3 applied. No modificiations were performed.
    It is a clear system for testing purposes. It has only the bare operating system, Office 2003 + SP3, and this Windows service application.

    I have some updates:

    - printing works when service is configured to run under a regular user;
    - printing also works when a regular (logged in) user prints the file;
    - printing also works when a DDE client launched by a regular (logged in) user prints the file.

    I have the feeling this is permission related. I checked %TEMP% directory (which for SYSTEM user is just %SystemRoot%\Temp) for permissions and SYSTEM has full permission on it.

    Hi,

     

    Do you automatic Office in server side? Please check the following KB article:

    Considerations for server-side Automation of Office

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

     

    I hope this helps.


    Best Regards, Calvin Gao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, May 18, 2011 10:07 AM
    Moderator

All replies

  • Hi,

     

    According to your illustration, I saw a VBA debug dialog. However, as we all know, a RTF file is unable to contain macro; I would like to know where you place the macro. Does the code locate at the Normal document? If so, would you like to post the code to let me know you handle the print action?

     

    Additionally, it is also seems a VB6 debug dialog. But I’m not sure…

     

    I look forward to hearing of you soon.


    Best Regards, Calvin Gao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 13, 2011 9:08 AM
    Moderator
  • Hi Calvin,

    Thank you for your reply.

    MS Office was installed and SP3 applied. No modificiations were performed.
    It is a clear system for testing purposes. It has only the bare operating system, Office 2003 + SP3, and this Windows service application.

    I have some updates:

      - printing works when service is configured to run under a regular user;
      - printing also works when a regular (logged in) user prints the file;
      - printing also works when a DDE client launched by a regular (logged in) user prints the file.

    I have the feeling this is permission related. I checked %TEMP% directory (which for SYSTEM user is just %SystemRoot%\Temp) for permissions and SYSTEM has full permission on it.

    Thanks for any tip or tests I could perform.

    regards,

    josue

     

     


    Friday, May 13, 2011 2:31 PM
  • MS Office was installed and SP3 applied. No modificiations were performed.
    It is a clear system for testing purposes. It has only the bare operating system, Office 2003 + SP3, and this Windows service application.

    I have some updates:

    - printing works when service is configured to run under a regular user;
    - printing also works when a regular (logged in) user prints the file;
    - printing also works when a DDE client launched by a regular (logged in) user prints the file.

    I have the feeling this is permission related. I checked %TEMP% directory (which for SYSTEM user is just %SystemRoot%\Temp) for permissions and SYSTEM has full permission on it.

    Hi,

     

    Do you automatic Office in server side? Please check the following KB article:

    Considerations for server-side Automation of Office

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

     

    I hope this helps.


    Best Regards, Calvin Gao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, May 18, 2011 10:07 AM
    Moderator
  • Hi Calvin,

     

    This helps a lot. Thank you for your time.

     

    regards,

    josue

    Friday, May 20, 2011 2:31 PM