Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

printing multiple copies VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GwenP - 15 Oct 2007 15:40 GMT
Hi

This line of code works perfectly in Word 2002 but ignores whatever is in
the text box now in Word 2003?

ActiveDocument.Printout Copies: = txtnum.value

I have tried ActiveDocument.Printout Copies: = val(txtnum.value) and this
does not work either?

Any suggestions anyone please?

Thanks
GwenP
Jonathan West - 15 Oct 2007 16:08 GMT
> Hi
>
[quoted text clipped - 7 lines]
>
> Any suggestions anyone please?

What *exactly* does txtnum.value contain? What kind of control is it?

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

GwenP - 15 Oct 2007 17:02 GMT
Thanks for your reply

txtnum.value is a text box on a user form created in Word 2003.
It contains a number that the user inputs as their number of copies for
printing.

I have tried it as a string and and integer or long but none of these work.

Thanks
GwenP

> > Hi
> >
[quoted text clipped - 9 lines]
>
> What *exactly* does txtnum.value contain? What kind of control is it?
Russ - 15 Oct 2007 19:03 GMT
Gwen,
Just as a quick troubleshooting clue, does it work from the immediate window
using for example:

ActiveDocument.Printout Copies: = "2"

> Thanks for your reply
>
[quoted text clipped - 20 lines]
>>
>> What *exactly* does txtnum.value contain? What kind of control is it?

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

GwenP - 16 Oct 2007 12:49 GMT
Hi Russ

Oddly - no this does not work as "2" or 2?

Its like the printers are fixed at 1 copy but & ignores anything sent from
VBA. This is happening on all our printers but the same line of code is
working OK from the Word XP PC's?

Also - it does work if I just use File Print & change copies to 2.

Thanks
GwenP

> Gwen,
> Just as a quick troubleshooting clue, does it work from the immediate window
[quoted text clipped - 26 lines]
> >>
> >> What *exactly* does txtnum.value contain? What kind of control is it?
Russ - 16 Oct 2007 18:35 GMT
Gwen,
I'm not sure what is going on, but it does seem like it because of the VBA
interface.

The next thing I would do, is compare the list of references activated
between the machines that work and those that don't. In other words go into
the VBA Editor in a machine and use the menu Tools/References...and see how
the references list differs among machines.

Also Certain add-ins (special templates) can mess things up. (i.e. Adobe PDF
add-in)

This below is from a previous posting talking about bookmarks:
*******
If this were mine, I would first rule out an extraneous (and very badly
behaved!) add-in. Try starting Word in safe mode (winword.exe /a).
=====(Gwen, try printing from safe mode)
Create the bookmark, save and re-open. Is the bookmark still there? If so,
then you job is to identify which global template or add-in is the culprit.
Ignore the name of the article and read here for ways to identify all loaded
add-ins:
<http://office.microsoft.com/en-au/word/HA011514521033.aspx?pid=CL1006364810
33> (cut and paste link between brackets, if clicking doesn't work)

Shauna Kelly.  Microsoft MVP.
*******

> Hi Russ
>
[quoted text clipped - 39 lines]
>>>>
>>>> What *exactly* does txtnum.value contain? What kind of control is it?

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.