Hello
I'm creating a custom outline numbered list with the code below and am
struggling to find the correct references for the CentimetersToPoints. The
error checking tooltiptext returns "Name 'CentimetersToPoint' is not
declared."
Can anybody help?

Private applicationObject As Word.Application

Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
Extensibility.IDTExtensibility2.OnStartupComplete

With
applicationObject.ListGalleries(Word.WdListGalleryType.wdOutlineNumberGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = "%1"
.TrailingCharacter = Word.WdTrailingCharacter.wdTrailingTab
.NumberStyle = Word.WdListNumberStyle.wdListNumberStyleArabic
.NumberPosition = CentimetersToPoints(0)
.Alignment = Word.WdListLevelAlignment.wdListLevelAlignLeft
.TextPosition = CentimetersToPoints(1.27)
.TabPosition = CentimetersToPoints(1.27)
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = 0
.Italic = 0
.StrikeThrough = 0
and so on........

Thankyou

Re: CentimetersToPoints by Tony

Tony
Wed Jul 23 02:43:27 PDT 2008

CentimetersToPoints is part of Word's object model, so you will need to
qualify it:

applicationObject.CentimetersToPoints

--
Enjoy,
Tony

"Cresta" <Cresta@discussions.microsoft.com> wrote in message
news:B03F4D2C-43C4-4663-B427-B583F68119AA@microsoft.com...
> Hello
> I'm creating a custom outline numbered list with the code below and am
> struggling to find the correct references for the CentimetersToPoints. The
> error checking tooltiptext returns "Name 'CentimetersToPoint' is not
> declared."
> Can anybody help?
>
> Private applicationObject As Word.Application
>
> Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
> Extensibility.IDTExtensibility2.OnStartupComplete
>
> With
> applicationObject.ListGalleries(Word.WdListGalleryType.wdOutlineNumberGallery).ListTemplates(1).ListLevels(1)
> .NumberFormat = "%1"
> .TrailingCharacter = Word.WdTrailingCharacter.wdTrailingTab
> .NumberStyle = Word.WdListNumberStyle.wdListNumberStyleArabic
> .NumberPosition = CentimetersToPoints(0)
> .Alignment = Word.WdListLevelAlignment.wdListLevelAlignLeft
> .TextPosition = CentimetersToPoints(1.27)
> .TabPosition = CentimetersToPoints(1.27)
> .ResetOnHigher = 0
> .StartAt = 1
> With .Font
> .Bold = 0
> .Italic = 0
> .StrikeThrough = 0
> and so on........
>
> Thankyou


RE: CentimetersToPoints by Cresta

Cresta
Wed Jul 23 02:59:01 PDT 2008

Thanks that worked.

"Cresta" wrote:

> Hello
> I'm creating a custom outline numbered list with the code below and am
> struggling to find the correct references for the CentimetersToPoints. The
> error checking tooltiptext returns "Name 'CentimetersToPoint' is not
> declared."
> Can anybody help?
>
> Private applicationObject As Word.Application
>
> Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
> Extensibility.IDTExtensibility2.OnStartupComplete
>
> With
> applicationObject.ListGalleries(Word.WdListGalleryType.wdOutlineNumberGallery).ListTemplates(1).ListLevels(1)
> .NumberFormat = "%1"
> .TrailingCharacter = Word.WdTrailingCharacter.wdTrailingTab
> .NumberStyle = Word.WdListNumberStyle.wdListNumberStyleArabic
> .NumberPosition = CentimetersToPoints(0)
> .Alignment = Word.WdListLevelAlignment.wdListLevelAlignLeft
> .TextPosition = CentimetersToPoints(1.27)
> .TabPosition = CentimetersToPoints(1.27)
> .ResetOnHigher = 0
> .StartAt = 1
> With .Font
> .Bold = 0
> .Italic = 0
> .StrikeThrough = 0
> and so on........
>
> Thankyou

Re: CentimetersToPoints by Jonathan

Jonathan
Wed Jul 23 02:09:48 PDT 2008

CentimetersToPoints is a method of the Application object in Word. In your
code below, you can replace CentimetersToPoints with
applicationObject.CentimetersToPoints.

But you can probably simplify things a bit more. 1.27 centimeters is half
and inch, or 36 points. So you can replace CentimetersToPoints(1.27) with
36. and replace CentimetersToPoints(0) with 0.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


"Cresta" <Cresta@discussions.microsoft.com> wrote in message
news:B03F4D2C-43C4-4663-B427-B583F68119AA@microsoft.com...
> Hello
> I'm creating a custom outline numbered list with the code below and am
> struggling to find the correct references for the CentimetersToPoints. The
> error checking tooltiptext returns "Name 'CentimetersToPoint' is not
> declared."
> Can anybody help?
>
> Private applicationObject As Word.Application
>
> Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
> Extensibility.IDTExtensibility2.OnStartupComplete
>
> With
> applicationObject.ListGalleries(Word.WdListGalleryType.wdOutlineNumberGallery).ListTemplates(1).ListLevels(1)
> .NumberFormat = "%1"
> .TrailingCharacter = Word.WdTrailingCharacter.wdTrailingTab
> .NumberStyle = Word.WdListNumberStyle.wdListNumberStyleArabic
> .NumberPosition = CentimetersToPoints(0)
> .Alignment = Word.WdListLevelAlignment.wdListLevelAlignLeft
> .TextPosition = CentimetersToPoints(1.27)
> .TabPosition = CentimetersToPoints(1.27)
> .ResetOnHigher = 0
> .StartAt = 1
> With .Font
> .Bold = 0
> .Italic = 0
> .StrikeThrough = 0
> and so on........
>
> Thankyou