Template Building Question

N

Nadihaha

Hi,

My boss has asked me to make a template for our policies, and most of it is
working great (with help from the fabulous people here)

the problem I'm having is that in the current manual versions that people
are using, they are entering the file tree (for want of a better explanation)
in the header.

Eg they read -
Operational Policy
Corporate Services
Information and Communication Services
Records Management Policy - (this is the filename)

So far I have a drop down box for the operational or other part which I can
get in the header no problem, also no problems with the file name.

I can do the Corporate Services part with a drop down of all the options,
but the next part depends on what is selected from the Corporate Services Box.

Is there a way that I can program it so that I can say if Corporate Services
is selected provide these options in the drop down box, if Financial Services
is selected pick these etc?

This would also relate to where the policies are meant to end up being saved
which if I could then get it to pick up those options for te filepath to save
as in would be fabulous. Currently I have a pop up box that provides numbered
options wich put it at the top of the tree (thanks to help from here) but if
I can get it closer to where it needs to be it would be great.

Thanks in advance - Hope I made sense. Oh and I'm a VBA novice so I may ask
silly questions I apologise now!!
 
N

Nadihaha

I found Info I think will work regarding the drop down boxes (working on that
now) http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm

does anyone know of a way to get word to access that info for the save as
path?

so for example it would go R:\Governance\Policy\First DropDown Box\Second
DropDown Box\Draft\Filename

With Governance and Policy being the higher file tree items and the drop
down boxes being the file path they need to go. Each of these folders would
then have a draft folder.

Many Thanks
 
T

That Guy

I have done something like this before using a string array.

When you add the items to the combo boxes they are added in a specific
order. It is safe to say they are 'indexed'. If you make an array of
strings with the same index then it is as simple as using the selected
index of the combobox as the index in the array.

for example:

in the first combobox you have this:

Governance
Policy
Files

when they select Governance, In the second combobox you have:

Draft (1)
Copy (2)
Finished (3)

Now if you had an array of strings like this:

Paths(1) = "R:\Governance\Policy\Draft\"
Paths(2) = "R:\Governance\Policy\Copy\"
Paths(3) = "R:\Governance\Policy\Finished\"

Then when you click your command button to save the file you would
use:

filename = Paths(secondCombobox.selectedindex)

This would in effect make it so that when they select Draft the file
name R:\Governance\Policy\Draft correlates to it.

I think that is what you were asking?
 
N

Nadihaha

Umm yes that's kind of it.

All of the files will need to have R:\Governance\Policy at the Start

I then have 2 Linked Dropdown boxes so that for example if Corporate
Services is selected Administration, ICT, OHS etc appear in the second
dropdown box.

When i insert a cross reference to the second dropdown box it comes up with
both the contents of the first dropdown box and the second (Probably due to
the linked factor)

I need for the rest of the file path to be the 1st dropdown box\2nd Dropdown
box\ Draft\the file title with draft added.

So I get that I could use the filename= Paths(sencondCombobox.selectedindex)
but how do I get a \ between whats in the first combo box and what the 2nd
combo box adds.

It's used elsewhere in the document so I dont want to put it in the combo box
 
T

That Guy

I am sorry I see know what you are saying. If the boxes contain
exactly what is meant to be in the file path then concatenate the
strings from each box:

Path = Combobox1.text & "\" & combobox2.text & "\" &
ComboboxX.text......

I Was approching it more as if there was no correlation between the
first and second box paths. I am sorry for not reading more closely.

Is that helpful?
 

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