Relative Path to Cd-rom Drive - Can that be done ??

M

mypretty1

Two problems in one

My project has to be run from at CD-rom, because of that the path ha
to be relative.
When I do initiaze my start.dot and run the macrobuttom it opens th
Payment.dot as a document without any problems.

My problems occurs when I have inserted something in the payment.do
and then closes it, I can no longer run any macrobuttons in th
start.dot. Instead I do get the message

Runtime error

the template do not exist


Beneath is two examples of two macrobuttons Ive tried to call it lik
this

Sub Hovedbrev()
'
' Hovedskab Makro
' Makro indspillet 12-01-2004 af Lars Gravesen
'
Documents.Add Template:= _
".\start.dot" _
, NewTemplate:=False, DocumentType:=0
End Sub


Sub payment()
'
' Payment Makro
' Makro indspillet 16-03-2004 af Lars Gravesen
'
Documents.Add Template:= _
".\Breve\payment.dot" _
, NewTemplate:=False, DocumentType:=0
End Sub




Hope that anyone can help me :)


Thanx a lot

Mariann
 
P

Peter Hewett

Hi mypretty1 <<[email protected]>>

I wouldn't do it that way. What I suspects happening is that the current directory is
changing, so second time around the reference fails. I'd use the current templates path
and determine any "relative" path based on that. To get the templates path use:
ThisDocument.Path

HTH + Cheers - Peter
 

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