Duplex problems when using vbscript forms in Word

R

Rob Kell

I have a word template that has macros that can be chosen to print to
different network printers. Some of the macros bring up a form that asks how
many copies are required. When this form appears word switches between open
documents. eg I have DOC 1 and DOC 2 open. From DOC 1 I choose print and
the macro brings up a previously created form. At this point, with the form
on screen, the document showing is now DOC 2. Can anyone help.
 
B

Bob I

Pretty tough to "fix" someones programming error. Perhaps the person who
designed/wrote the macros would be helpful.
 
R

Rob Kell

Bob

Thanks for your response to my problem. (response posted at end of Sept).

I have been involved in other projects since September and my problem was
put on a back burner.

Now I would like to respond to you message.

I wrote the Macro. I don't think it is a problem with the macro. I you
test it yourself I think you will get the same results. It only takes a
moment to test it. Go into the Visual Basic editor in a Word template and
create a form with a textbox and 2 buttons. On one button_click event have
the assign a pre-defined variable with the text in the textbox and close the
form, the other button_click simply close the form. Now set up a subroutine
that shows the form and add that as an option on a dropdown menu.

With this template in your Office-Startup folder open 3 new word documents
and add the test 'Doc 1', 'Doc 2', 'Doc 3' to each so that you can see the
difference between them. In 'Doc 2' use the drop down option that shows your
form. When the form is on screen notice the document behind it. It will have
changed. If it hasn't then go to another document and test it on that.

Please let me know what happens.

It is not a programming error. This is an issue with VB being used as a
template for Word.

Thank

Rob Kell
IT
 
B

Bob I

Attempting to follow along with your "macro", I can't make heads or
tails of what you are doing!
 
R

Rob Kell

Sorry Bob, I will try to be clearer. Let me first give you a little
background.

At my company we have a printing template that gives users a new dropdown
menu which offers printing to any Networked printer throughout the company.
One of the options is to print a copy of an open Word document which, when
selected, shows a VBform asking how many copies are required. The problem
arises when the user has more than 1 document open and they choose to print a
copy. When the VBform appears on screen the document behind will change to
another open document.

To test please create a Word Template. Open up the Visual Basic Editor and
create a new VBform. Add two buttons and a textbox to the form. Assign the
button_click event of 1 button to read in the text in the textbox and assign
it to a predefined variable and then to close the VBform, assign the
button_click of the other button to simply close the VBform.
In the modules section create a sub-routine to show the VBform.
Exit the VB Editor and customise the toolbar of the Word Template by adding
a new DropDown option that points to the newly created sub-routine so that
when the option is clicked the VBform is shown on screen.
Save the Template in the startup directory in the Office folder on C:/ so
that it is used when Word is started.

Now open up 3 versions of word so that there are 3 separate Word entries on
the Taskbar. In each document type 'DOC1', 'DOC2' and 'DOC3' respectively so
that it is obvious which document you are looking at. While looking at DOC2
click on the newly created dropdown. When the form appears on screen the
document in the background will be DOC3.
 
R

Rob Kell

I cannot ask over 200 users to only open one document at a time.

Did you get the same problem?
 
B

Bob I

I don't know why it wants to cycle the "current doc" but at some point
"complexity of setup" vs "ease of use" blows up in ones face due to some
"insignificant upgrade". That is when I really get fed up with the mess,
and start using only "provided tools".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top