+ Reply to Thread
Results 1 to 4 of 4

VBA label printer initialization fails with Excel but never with Word

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003, 2010
    Posts
    9

    VBA label printer initialization fails with Excel but never with Word

    Hi

    We are using some Citizen cl-s700 label printers and the following code will always successfully initialize the printers when activated from a Word template (.dot):

    Please Login or Register  to view this content.
    Somehow it fails more often than not when activated from Excel (no matter if it is saved as .xls, .xlsx, .xlt, .xltm).

    Why? What can be done to make this code succeed with Excel?

    Thank you for helping.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA label printer initialization fails with Excel but never with Word

    Hi,

    I don't see how that could work in Word either as you are passing gra1 as a literal string, not the value of the variable. It should read
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    10-14-2013
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003, 2010
    Posts
    9

    Re: VBA label printer initialization fails with Excel but never with Word

    Hi

    Thank you for your suggestion!

    But strangely enough the code works perfectly from Word - as it has done for years. I will of course check your corrections, but I don't believe it will make any difference. I however cannot check it before monday. I'll be back.

  4. #4
    Registered User
    Join Date
    10-14-2013
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003, 2010
    Posts
    9

    Re: VBA label printer initialization fails with Excel but never with Word

    Hi

    Thank you for your suggestion!

    But strangely enough the code works perfectly from Word - as it has done for years. I will of course check your corrections, but I don't believe it will make any difference. I however cannot check it before monday. I'll be back.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel to Word macro fails when started from another sheet
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2015, 03:40 AM
  2. Excel to label printer
    By monday in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2014, 06:53 AM
  3. Pasting text from excel to word fails
    By Alexander_Golinsky in forum Excel General
    Replies: 0
    Last Post: 08-21-2012, 05:22 AM
  4. [SOLVED] Pasting as plain text from excel to word fails
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2012, 01:06 PM
  5. VBA code to print defined cells to a thermal label printer
    By parkles in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2012, 04:06 AM
  6. excel vba word merge printer error
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2006, 02:10 PM
  7. Convert Word Label to Excel
    By gmurry in forum Excel General
    Replies: 0
    Last Post: 11-29-2005, 07:40 PM

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