LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 303
Default word more intelligent than excel???

Working with network prionters it has been a problem to tell excel which
port the printer is on. I.e. either Ne01, Ne02, Ne03 or Ne04.

E Ehren came up with a solution ,,, looping through the possible numbers
untill there was a match. This works fine in excel.

Used the same code to prevent the problem in a word macro.
It appears that word can intuitively pick up the right number.

The word macro .................

oldpname = Application.ActivePrinter 'at this stage printer is the default
inkjet printer
__don't need this__For j = 0 To 9
__don't need this__On Error Resume Next
__don't need this__temppname = "\\nzdfprn01\Label_UHT_Sato on Ne0" & j & ":"

instead use this..................
temppname = "\\nzdfprn01\Label_UHT_Sato "
Application.ActivePrinter = temppname 'it selects the right printer here
'application
active printer is now the sato label printer on Ne03 for instance
__don't need this__If Application.ActivePrinter = temppname Then
__don't need this__Exit For
__don't need this__End If
__don't need this__Next j

printlabel
Application.ActivePrinter = oldpname
End Sub

The lines with __don't need this__ are necessary in the excel macro to be
able to find the right number.

Is there another way for excel to make it "smarter"?
I don't like to have to accept that word is smarter.


Regards
Bill Kuunders


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Excel count of 1 word if found in multi-word cells of column Function_Challenged Excel Worksheet Functions 1 August 27th 09 12:08 AM
Stop the 'intelligent' copying? Terry Pinnell Excel Discussion (Misc queries) 2 October 26th 08 10:50 AM
Stop the 'intelligent' copying? Terry Pinnell Excel Discussion (Misc queries) 2 October 23rd 08 01:08 PM
Intelligent lookup of a suburb Mike Langensiepen New Users to Excel 3 June 2nd 07 01:29 AM
Intelligent VLOOKUP DKS Excel Worksheet Functions 3 September 19th 06 03:42 AM


All times are GMT +1. The time now is 10:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"