Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Accessing Document Template field of MSWORD

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,49813
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Accessing Document Template field of MSWORD
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Accessing Document Template field of MSWORD - 7/23/2007 12:08:35 AM   
  abolo

 

Posts: 2
Score: 0
Joined: 7/23/2007
Status: offline
Hey there,

I am trying to use vbscript to read/modify the Document Template path of a Microsoft word document.

The particular path I mean can be found by clicking
Tools -> Templates and Addins, and under "Document Template".

Any code that I have encountered so far will only allow me to get the path of the global template, and that of other added templates.


Any suggestions as to how through vbscript I can get to the document template?

Sorry about bad english, it's not my native language.

Thank you in advance.

Ps. I am using word version 2002, 10.6829.6830 sp3
 
 
Post #: 1
 
 RE: Accessing Document Template field of MSWORD - 7/23/2007 4:35:21 AM   
  CaffeineAddict

 

Posts: 17
Score: 0
Joined: 11/10/2006
Status: offline
Well, first off ... lets figure out what your trying to do.  Is there any reason why you just dont replace the template file rather than changing the path?  Usualy that would be the easyest method of changing the default template.  Just make sure to backup the original.

(in reply to abolo)
 
 
Post #: 2
 
 RE: Accessing Document Template field of MSWORD - 7/24/2007 7:24:05 PM   
  abolo

 

Posts: 2
Score: 0
Joined: 7/23/2007
Status: offline
Hey,

The document template path points back to a share on a server which no longer exists. Since this field is stored on a document by document basis it is causing problems for me.

I can see the path if I open the .doc file with a hex editor. However, I am reluctant to change this field in the file by using an ad hoc replacement with my desired path, in fear that it may leave the file in an inconsistent state which could cause future unseen problems.

(in reply to CaffeineAddict)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Accessing Document Template field of MSWORD Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts