Public Variable

R

RKF

Hi Folks,

I have a template in WORD 2K7 for which I would like to implement a public
variable. I will use that variable to cause certain actions depending on the
variable's value.

Id est, I want to relocate to a specific bookmark within the document but
only the first time a subroutine is called. For example, in the template I
make use of a routine to throw a calendar on the form from which the user
will select a date then push that date to the document. Once the date gets
posted, I use the .Range method to reposition the pointer to another
bookmark.

I call that same calendar a second time at the end of the template/document
so I need some way of skipping the line that repositions the pointer to that
bookmark...

Every attempt I have made to use a public variable has failed with the error
that the variable is not declared.... I am unable to discern the cause for
the error as I have declared the variable. I have also tried, unsuccessfuly
to create the variable and pass it to another sub as a parameter.

I would be happy to send the tempate if anyone thinks they can determine or
help me determine what I am doing wrong.

Most appreciated.

Ferg
 
D

Doug Robbins - Word MVP

Firstly. there is almost certainly on need to moving the selection to
various parts of the document.

Probably a better way to display the selected dates in the document would be
to use Docvariable fields.

Or, perhaps use Datepicker content controls directly in the template itselt.

Without knowing more about your form, it is difficult to tell exactly what
the best method would be.

Why do you think that you need a Public Variable and for what do you want to
use it?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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