Click here to Skip to main content
15,886,919 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Check Remote sql connecton is exist or not? Pin
jschell18-Feb-11 9:02
jschell18-Feb-11 9:02 
GeneralRe: Check Remote sql connecton is exist or not? Pin
Nitin Singh India21-Mar-11 7:36
Nitin Singh India21-Mar-11 7:36 
QuestionWhile creating dataset if i click new connection button it is disappearing in visual studio 2008 windows appln Pin
sr15916-Feb-11 22:22
sr15916-Feb-11 22:22 
AnswerRe: While creating dataset if i click new connection button it is disappearing in visual studio 2008 windows appln Pin
Ravi Sant16-Feb-11 23:23
Ravi Sant16-Feb-11 23:23 
QuestionHow to modify the dataset from payroll_systemconnectionstring (database name payroll_system) to another payrollconnectionstring (database name payroll) Pin
sr15916-Feb-11 19:38
sr15916-Feb-11 19:38 
AnswerRe: How to modify the dataset from payroll_systemconnectionstring (database name payroll_system) to another payrollconnectionstring (database name payroll) Pin
Richard MacCutchan17-Feb-11 0:19
mveRichard MacCutchan17-Feb-11 0:19 
AnswerRe: How to modify the dataset from payroll_systemconnectionstring (database name payroll_system) to another payrollconnectionstring (database name payroll) Pin
Ravi Sant17-Feb-11 0:52
Ravi Sant17-Feb-11 0:52 
QuestionHow to get my Word templates and AutoTexts with Interop? Pin
Bernhard Hiller16-Feb-11 3:37
Bernhard Hiller16-Feb-11 3:37 
With Microsoft Word, we can use templates to create documents, and "AutoTexts" to enter text more quickly. I was trying to find out how I could access those features via Interop from a C# application.

The Word.Application object has a property Templates. Also a Word.Document has a property AttachedTemplate.

When I do
Word.Application wordApp = new Word.Application();

the "Templates" does always contain exactly one template - that is Normal.dotm.

When I do
object missing = System.Reflection.Missing.Value;
Word.Application wordApp = new Word.Application();
Word.Document doc = wordApp.Documents.Add(missing, missing, missing, missing);
Template template = doc.get_AttachedTemplate();

template is also always Normal.dotm.
And the same holds true, when I do
Template template = wordApp.NormalTemplate;

Never did I get my other templates.

A Template has an AutoTextEntries property. I find only two entries: my initials and my full name. Never did I see my other AutoTexts.

A Google search was not successful, only lots of hits for opening Word with a template of known path. But I want to enumerate all existing templates, and then get my AutoTexts...

Some further information: on my Win7-64bit computer, Word 2007 is installed. The Interop.Word was generated with Word XP in order to stay compatible with our customers using older software.

Thanks a lot for your help,
Bernhard
GeneralRe: How to get my Word templates and AutoTexts with Interop? [modified] Pin
musefan16-Feb-11 4:05
musefan16-Feb-11 4:05 
GeneralRe: How to get my Word templates and AutoTexts with Interop? [modified] Pin
musefan16-Feb-11 4:13
musefan16-Feb-11 4:13 
GeneralRe: How to get my Word templates and AutoTexts with Interop? Pin
Bernhard Hiller16-Feb-11 20:00
Bernhard Hiller16-Feb-11 20:00 
AnswerRe: How to get my Word templates and AutoTexts with Interop? Pin
Bernhard Hiller16-Feb-11 20:41
Bernhard Hiller16-Feb-11 20:41 
QuestionHow to resolve sgen.exe error Pin
meeram39515-Feb-11 21:37
meeram39515-Feb-11 21:37 
AnswerRe: How to resolve sgen.exe error Pin
Richard MacCutchan15-Feb-11 23:02
mveRichard MacCutchan15-Feb-11 23:02 
AnswerRe: How to resolve sgen.exe error Pin
Yusuf16-Feb-11 3:21
Yusuf16-Feb-11 3:21 
QuestionProcess::HasExited always true Pin
piul15-Feb-11 2:07
piul15-Feb-11 2:07 
AnswerRe: Process::HasExited always true Pin
Luc Pattyn15-Feb-11 3:10
sitebuilderLuc Pattyn15-Feb-11 3:10 
GeneralRe: Process::HasExited always true Pin
piul15-Feb-11 3:20
piul15-Feb-11 3:20 
GeneralRe: Process::HasExited always true Pin
Ravi Sant15-Feb-11 3:42
Ravi Sant15-Feb-11 3:42 
AnswerRe: Process::HasExited always true Pin
RobCroll15-Feb-11 4:20
RobCroll15-Feb-11 4:20 
AnswerRe: Process::HasExited always true Pin
Eddy Vluggen16-Feb-11 2:07
professionalEddy Vluggen16-Feb-11 2:07 
QuestionAccessing control from a different thread Pin
piul14-Feb-11 23:18
piul14-Feb-11 23:18 
AnswerRe: Accessing control from a different thread Pin
piul14-Feb-11 23:41
piul14-Feb-11 23:41 
AnswerRe: Accessing control from a different thread Pin
Simon_Whale14-Feb-11 23:59
Simon_Whale14-Feb-11 23:59 
AnswerRe: Accessing control from a different thread Pin
Luc Pattyn15-Feb-11 3:14
sitebuilderLuc Pattyn15-Feb-11 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.