Re: PIA Problem
- From: "Venketash \(Pat\) Ramadass" <pat.ramadass@xxxxxxxxxxxxxx>
- Date: Thu, 19 Jan 2006 10:29:12 +0200
Should I be able to do something like...
foreach(Paragraph paragraph in document.Paragraphs)
{
Type type = paragraph.Range.GetType();
MethodInfo mi = type.GetMethod("get_Style");
if(mi != null)
{
object value = mi.Invoke(paragraph, null);
Style style = (Style)value;
MessageBox.Show(style.NameLocal);
}
}
Thanks.
-Pat
"Venketash (Pat) Ramadass" <pat.ramadass@xxxxxxxxxxxxxx> wrote in message
news:uZIR3%23MHGHA.3056@xxxxxxxxxxxxxxxxxxxxxxx
> Hi there,
>
> I am using the Office 2003 PIA's as found at...
> http://www.microsoft.com/downloads/details.aspx?FamilyID=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&DisplayLang=en
>
> I am trying to iterate through all the paragraphs of a document and get
> the respective styles and for specific style names extract the text of the
> paragraph using c#.
>
> The "Using Accessor methods in Word" at...
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/OffCSharp.asp
> ...seems to be what I want. But I cannot for the life of me find get_Style
> or set_Style on my Range object as in that example. Even tried reflection
> to no avail. Am I using the wrong PIA? Am I calling it incorrectly?
>
> Any help would be appreciated as I am rather confused.
>
> Kind regards,
>
> -Venketash (Pat) Ramadass
>
.
- References:
- PIA Problem
- From: Venketash \(Pat\) Ramadass
- PIA Problem
- Prev by Date: PIA Problem
- Next by Date: Re: Keybindings in word addins
- Previous by thread: PIA Problem
- Next by thread: Re: Vanished menu options...
- Index(es):
Relevant Pages
|