Custom Macro my documents defaulting error

D

Dane Newman

,

We use word 2003 in our company. We have some shared folders that we want
our users to have a direct path to from word. We created a macro

Sub ISP()

ChangeFileOpenDirectory "\\Xpcdc001\Plans\ISP\"
SendKeys "^o" '
End Sub

This macro browsers to the \\Xpcdc001\Plans\ISP\ share and then does a
control O to open the open file box.

We added this macro under tools --> macros --> macros

then added the macros name and typed the vba code between the sub and end
sub into the editor.

Next we wanted to create a custom menu item linking to this macro so that
our users would be able to run it easy .

We went to tools --> custom --> comands

added a new menu and added the macro to the menu.

We get very odd results.

When word is started and you go to the menu and click the macro it opens the
open file box and defaults to my documents (which is incorrect because it
should default to the share specified) When you close the file open box and
reclick it without closing word you get the correct location in the file
open box. You get the correct location everytime then when you click the
macro till word is closed and reloaded. Always on the first time it
defaults to the my documents location.

I have downloaded all patches and service pack 2 from office website and
still did not resolve the problem.
Any input on this problem will help alot.

As a side note we have a bunch of macros we created and put them on menu
items for users. So ajusting file location in the Word is not an option
since this needs to work for more then 1 location.

I have also tested Changing the shared folders location and it still does
the samething.

This is on every computer in our company is acting this one not just a
single one. I have verified it is a problem that is effecting every copy of
word .

We have reccently upgraded everyone in our company from office XP to office
2003 and this was NOT the default behavior of word XP. Word XP did not have
this issue of defaulting to my documents. It seems only word 2003 has this
issue.


(e-mail address removed)
 
C

Cindy M -WordMVP-

Hi Dane,

I'm not sure the following suggestion will help, but at least it's a place to
start. Try removing SendKeys and instead use

Dialogs(wdDialogFileOpen).Show
We use word 2003 in our company. We have some shared folders that we want
our users to have a direct path to from word. We created a macro

Sub ISP()

ChangeFileOpenDirectory "\\Xpcdc001\Plans\ISP\"
SendKeys "^o" '
End Sub

This macro browsers to the \\Xpcdc001\Plans\ISP\ share and then does a
control O to open the open file box.

We added this macro under tools --> macros --> macros

then added the macros name and typed the vba code between the sub and end
sub into the editor.

Next we wanted to create a custom menu item linking to this macro so that
our users would be able to run it easy .

We went to tools --> custom --> comands

added a new menu and added the macro to the menu.

We get very odd results.

When word is started and you go to the menu and click the macro it opens the
open file box and defaults to my documents (which is incorrect because it
should default to the share specified) When you close the file open box and
reclick it without closing word you get the correct location in the file
open box. You get the correct location everytime then when you click the
macro till word is closed and reloaded. Always on the first time it
defaults to the my documents location.

I have downloaded all patches and service pack 2 from office website and
still did not resolve the problem.
Any input on this problem will help alot.

As a side note we have a bunch of macros we created and put them on menu
items for users. So ajusting file location in the Word is not an option
since this needs to work for more then 1 location.

I have also tested Changing the shared folders location and it still does
the samething.

This is on every computer in our company is acting this one not just a
single one. I have verified it is a problem that is effecting every copy of
word .

We have reccently upgraded everyone in our company from office XP to office
2003 and this was NOT the default behavior of word XP. Word XP did not have
this issue of defaulting to my documents. It seems only word 2003 has this
issue.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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