Prev: Copying number to clipboard, subtracting 398 then pasting the value to overwrite the original
Next: Word-to-prn
From: Lina on 22 Mar 2010 08:34 Hi Im trying to convert my vba code to vb.net and have a problem. I have a function that returns the default file path for the usertemplates, another one for the workgrouptemplates. I need to know both because I want to create documents based on templates that are placed in theese diredtions. vba getTemplateFilePath = Application.Options.DefaultFilePath(wdUserTemplatesPath) & "\" I have found the Globals.ThisAddIn.Application.Options.DefaultFilePath but I dont understand how I can specify to make it return the usertemplatesPath? does anyone know?
From: Peter Jamieson on 23 Mar 2010 06:45
It's very similar, e.g. MsgBox(Me.Application.Options.DefaultFilePath(Word.WdDefaultFilePath.wdUserTemplatesPath)) (You may need a reference other than "Me") You may find the MS VSTO forum useful: http://social.msdn.microsoft.com/Forums/en-US/vsto/threads Peter Jamieson http://tips.pjmsn.me.uk On 22/03/2010 12:34, Lina wrote: > Hi > Im trying to convert my vba code to vb.net and have a problem. I have a > function that returns the default file path for the usertemplates, another > one for the workgrouptemplates. I need to know both because I want to create > documents based on templates that are placed in theese diredtions. > > vba > getTemplateFilePath = > Application.Options.DefaultFilePath(wdUserTemplatesPath)& "\" > > I have found the Globals.ThisAddIn.Application.Options.DefaultFilePath but I > dont understand how I can specify to make it return the usertemplatesPath? > does anyone know? |