Macros on a Pen Drive - file location issues +

J

Johnnyboy5

I have several documents on a Pen Drive which have macros in them in
which there are some links for other file locations on the same Pen
Drive - mainly an Excel mail merge file.

e.g.

ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
ActiveDocument.MailMerge.OpenDataSource Name:= _

"I:\0.1 Care planning templates\0.1 care planning raw
data.xls", _

ConfirmConversions:=False, ReadOnly:=False,
LinkToSource:=True, _


This example above shows that the file location is "I" however if I
work on another laptop or in work etc and plug in the pen drive - it
can be read as another drive like "F" or "G" and therefore the macro
fails to run.

Is there a way to make all computers recognise the pen drive as a fix
drive letter say "Z" or something like that.

The laptops could have XP or Vista or even Windows 7


Regards

Johnnyboy
 
S

Steve Hayes

I have several documents on a Pen Drive which have macros in them in
which there are some links for other file locations on the same Pen
Drive - mainly an Excel mail merge file.

e.g.

ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
ActiveDocument.MailMerge.OpenDataSource Name:= _

"I:\0.1 Care planning templates\0.1 care planning raw
data.xls", _

ConfirmConversions:=False, ReadOnly:=False,
LinkToSource:=True, _


This example above shows that the file location is "I" however if I
work on another laptop or in work etc and plug in the pen drive - it
can be read as another drive like "F" or "G" and therefore the macro
fails to run.

Is there a way to make all computers recognise the pen drive as a fix
drive letter say "Z" or something like that.

The laptops could have XP or Vista or even Windows 7

Run diskmgmt.msc and change the drive letter to what you want.

Each computer should continue to recognise that drive as the drive letter you
assign unless you assign it to another drive.
 
J

Johnnyboy5

Run diskmgmt.msc and change the drive letter to what you want.

Each computer should continue to recognise that drive as the drive letteryou
assign unless you assign it to another drive.

OK thanks will try it out on various computers as see if it works.

Johnnyboy
 
J

Johnnyboy5

OK thanks will try it out on various computers as see if it works.

Johnnyboy

Nope - no joy - tried it on two tonight and even after renaming it to
z on the one - the other pull it up as I and infact wouldn't let me
access it.

Maybe I should have said the pen drive has a password protect system
before it can load the actual drive - but I can access it and remain
it - but as I say each computer sees it as a different drive.

Any other ideas out there ?

John
 

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