If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Linking to other .dot files without the full path to dot file - Help please !
HI I have a start dot file I open as the file. This has a main menu that
links to a dot letters. From this file I open the letter that I want by using this code: Sub replylettercomplaint() ' ' Replylettercomplaint Makro ' Makro indspillet 16-03-2004 af Lars Gravesen ' Documents.Add Template:= _ ".\Breve\reply_lettercomplaint.dot" _ , NewTemplate:=False, DocumentType:=0 End Sub This works fine and from this document now open I can open other dot files. BUT my problem is when I use some of the macros that I have in the open document for inserting a sentence. When I have inserted /used a macro all my links to other dot files are broken and does not work. If I instead use a full path to the documents this error does not appear. BUT I can't use a full path because I need to run this from a CD and I do not always know which letter this cd drive will have. An example of the macro that I am using to insert a sentence is shown bellow whenever this is run my path to other dot files does not seam to work. Sub ViHendlederDeres() ' ' ViHendlederDeres Makro ' Makro indspillet 12-01-2004 af Marianne Lolholm ' Selection.TypeText Text:= _ "Please forward your price-list and terms of payment. " Selection.Comments.Add Range:=Selection.Range Selection.TypeText Text:="Send mig venligst Deres katalog over kontormøbler" ActiveWindow.ActivePane.Close End Sub Any ideas would be so nice Thanks Lars Gravesen --- Message posted from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
Linking to other .dot files without the full path to dot file - Help please !
Hi Gravesen,
This works fine and from this document now open I can open other dot files. BUT my problem is when I use some of the macros that I have in the open document for inserting a sentence. When I have inserted /used a macro all my links to other dot files are broken and does not work. If I instead use a full path to the documents this error does not appear. BUT I can't use a full path because I need to run this from a CD and I do not always know which letter this cd drive will have. You could try getting the path dynamically. Something like ThisDocument.Path (ThisDocument to be sure it always checks the path where the "main template" is opened from) Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003) 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 :-) |
Thread Tools | |
Display Modes | |
|
|