Prev: Delete table and text box in current section
Next: Word 2003 - Force Page Info Field Refresh/Repagination Via Mac
From: avkokin on 14 May 2010 07:38 Hello. How can I get previous full path to the attached template from the window "Templates and Add-ins" (tab "Templates")? See screen: http://clip2net.com/clip/m8665/1273836092-clip-20kb.jpg I created one document from my template which locating into my flash drive. This flash drive has name is "E:". When I moved the flash drive on other PC, the name of flash drive was changed and got as "F:". Meanwhile into that field I see my previous path to my template. That is path I want to get. If I running this macro: Set tmpl = ActiveDocument.AttachedTemplate tmplPath = tmpl.FullName then I getting the path to global template. But it's not that I wanted.
From: Doug Robbins - Word MVP on 14 May 2010 16:24 To start with, you should not work with documents directly from a flash drive. Sooner or later, you will end up causing them to become corrupted. When you open a document, if the template from which it is created is not available in the location where it was when the document was created, the normal.dot template will be substituted for it. This is by default (to allow the moving a document from one computer to another) and cannot be changed. The only way that you could create a record of the template from which the document was created would be to have a macro run when the document is created that created either a custom document property or a document variable that was populated with the name of the template. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "avkokin" <avkokin(a)gmail.com> wrote in message news:eb84077d-071e-443b-b1ef-7125b49727b2(a)e1g2000yqe.googlegroups.com... > Hello. > How can I get previous full path to the attached template from the > window "Templates and Add-ins" (tab "Templates")? See screen: > http://clip2net.com/clip/m8665/1273836092-clip-20kb.jpg > I created one document from my template which locating into my flash > drive. This flash drive has name is "E:". When I moved the flash drive > on other PC, the name of flash drive was changed and got as "F:". > Meanwhile into that field I see my previous path to my template. That > is path I want to get. > If I running this macro: > Set tmpl = ActiveDocument.AttachedTemplate > tmplPath = tmpl.FullName > then I getting the path to global template. But it's not that I > wanted. >
From: avkokin on 15 May 2010 04:59
Thank you very much, Doug! Yes, I thought of it. Perhaps, it is an only true way. On May 15, 12:24 am, "Doug Robbins - Word MVP" <d...(a)REMOVECAPSmvps.org> wrote: > To start with, you should not work with documents directly from a flash > drive. Sooner or later, you will end up causing them to become corrupted. > > When you open a document, if the template from which it is created is not > available in the location where it was when the document was created, the > normal.dot template will be substituted for it. This is by default (to > allow the moving a document from one computer to another) and cannot be > changed. > > The only way that you could create a record of the template from which the > document was created would be to have a macro run when the document is > created that created either a custom document property or a document > variable that was populated with the name of the template. > > -- > Hope this helps. > > Please reply to the newsgroup unless you wish to avail yourself of my > services on a paid consulting basis. > > Doug Robbins - Word MVP, originally posted via msnews.microsoft.com > > "avkokin" <avko...(a)gmail.com> wrote in message > > news:eb84077d-071e-443b-b1ef-7125b49727b2(a)e1g2000yqe.googlegroups.com... > > > > > Hello. > > How can I get previous full path to the attached template from the > > window "Templates and Add-ins" (tab "Templates")? See screen: > >http://clip2net.com/clip/m8665/1273836092-clip-20kb.jpg > > I created one document from my template which locating into my flash > > drive. This flash drive has name is "E:". When I moved the flash drive > > on other PC, the name of flash drive was changed and got as "F:". > > Meanwhile into that field I see my previous path to my template. That > > is path I want to get. > > If I running this macro: > > Set tmpl = ActiveDocument.AttachedTemplate > > tmplPath = tmpl.FullName > > then I getting the path to global template. But it's not that I > > wanted.- Hide quoted text - > > - Show quoted text - |