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

.NET (Core and Framework)

 
GeneralRe: Learn C# Online Pin
Helfdane17-Feb-11 23:24
Helfdane17-Feb-11 23:24 
GeneralRe: Learn C# Online Pin
RobCroll18-Feb-11 3:02
RobCroll18-Feb-11 3:02 
AnswerRe: Learn C# Online Pin
Jyothikarthik_N22-Feb-11 18:43
Jyothikarthik_N22-Feb-11 18:43 
JokeRe: Learn C# Online Pin
bencr23-Feb-11 0:02
bencr23-Feb-11 0:02 
AnswerRe: Learn C# Online Pin
Lisa Z. Morgan23-Feb-11 1:09
Lisa Z. Morgan23-Feb-11 1:09 
AnswerRe: Learn C# Online Pin
walvdlz22-Feb-11 19:07
walvdlz22-Feb-11 19:07 
AnswerRe: Learn C# Online Pin
Steve Lydford22-Feb-11 23:06
Steve Lydford22-Feb-11 23:06 
AnswerRe: Learn C# Online Pin
Daniel Payne23-Feb-11 2:00
Daniel Payne23-Feb-11 2:00 
AnswerRe: Learn C# Online Pin
Hallmanac23-Feb-11 3:02
Hallmanac23-Feb-11 3:02 
AnswerRe: Learn C# Online Pin
Helfdane23-Feb-11 3:09
Helfdane23-Feb-11 3:09 
AnswerRe: Learn C# Online Pin
Bluestater23-Feb-11 3:55
Bluestater23-Feb-11 3:55 
AnswerRe: Learn C# Online Pin
lmarrette23-Feb-11 4:22
lmarrette23-Feb-11 4:22 
AnswerRe: Learn C# Online [modified] Pin
BillWoodruff3-Mar-11 20:53
professionalBillWoodruff3-Mar-11 20:53 
AnswerRe: Learn C# Online Pin
Prasanta_Prince14-Apr-11 0:22
Prasanta_Prince14-Apr-11 0:22 
QuestionCheck Remote sql connecton is exist or not? [modified] Pin
RA|-|UL PATEL17-Feb-11 20:12
RA|-|UL PATEL17-Feb-11 20:12 
AnswerRe: Check Remote sql connecton is exist or not? Pin
Richard MacCutchan17-Feb-11 22:01
mveRichard MacCutchan17-Feb-11 22:01 
GeneralRe: Check Remote sql connecton is exist or not? Pin
RA|-|UL PATEL17-Feb-11 22:10
RA|-|UL PATEL17-Feb-11 22:10 
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

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.