Skip to main content

Hello,

I'm creating a Word file and trying to insert a numbered list by using a cobol definition of Word.

I've created a very simple Word macro but I can not translate to Cobol.

Can anybody help me?

This is the macro code:

    ListGalleries(wdNumberGallery).ListTemplates(1).Name = ""
    Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
        ListGalleries(wdNumberGallery).ListTemplates(1), ContinuePreviousList:= _
        False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
        wdWord10ListBehavior
    Selection.TypeText Text:="TEST"

Thanks!!


#AcuCobol
#extend32-bitRuntime

Hello,

I'm creating a Word file and trying to insert a numbered list by using a cobol definition of Word.

I've created a very simple Word macro but I can not translate to Cobol.

Can anybody help me?

This is the macro code:

    ListGalleries(wdNumberGallery).ListTemplates(1).Name = ""
    Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
        ListGalleries(wdNumberGallery).ListTemplates(1), ContinuePreviousList:= _
        False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
        wdWord10ListBehavior
    Selection.TypeText Text:="TEST"

Thanks!!


#AcuCobol
#extend32-bitRuntime

inquire word-app, @ListGalleries

                              in word-ListGalleries.

          modify word-ListGalleries, @Item = 2

                                     giving word-ListGallery.

          inquire word-ListGallery, @ListTemplates in

                                     word-ListTemplates.

          modify word-ListTemplates, @Item = 1

                          giving word-ListTemplate.

          inquire word-ListTemplate, @ListLevels

                          in word-ListLevels.

          modify word-ListLevels, @Item = 1 giving word-ListLevel.

          modify word-ListLevel,

                      @NumberFormat = "%1.",

                      @TrailingCharacter = wdTrailingTab,

                      @NumberStyle = wdListNumberStyleArabic,

                      @NumberPosition = 28,35,

                      @Alignment = wdListLevelAlignLeft,

                      @TextPosition = 28,35,

                      @TabPosition = 28,35,

                      @ResetOnHigher = 0,

                      @StartAt = 1.

          modify word-ListTemplate, @Name = "".

          modify word-app, @Selection::Range::ListFormat::

                  ApplyListTemplate(word-ListTemplate, 0, 1, 1).

          modify word-app, @Selection::TypeText ="esto es".

          modify word-app, @Selection::TypeParagraph().

          MODIFY word-app, @Selection::TypeText ="Nada".


Hello,

I'm creating a Word file and trying to insert a numbered list by using a cobol definition of Word.

I've created a very simple Word macro but I can not translate to Cobol.

Can anybody help me?

This is the macro code:

    ListGalleries(wdNumberGallery).ListTemplates(1).Name = ""
    Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
        ListGalleries(wdNumberGallery).ListTemplates(1), ContinuePreviousList:= _
        False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
        wdWord10ListBehavior
    Selection.TypeText Text:="TEST"

Thanks!!


#AcuCobol
#extend32-bitRuntime

inquire word-app, @ListGalleries

                              in word-ListGalleries.

          modify word-ListGalleries, @Item = 2

                                     giving word-ListGallery.

          inquire word-ListGallery, @ListTemplates in

                                     word-ListTemplates.

          modify word-ListTemplates, @Item = 1

                          giving word-ListTemplate.

          inquire word-ListTemplate, @ListLevels

                          in word-ListLevels.

          modify word-ListLevels, @Item = 1 giving word-ListLevel.

          modify word-ListLevel,

                      @NumberFormat = "%1.",

                      @TrailingCharacter = wdTrailingTab,

                      @NumberStyle = wdListNumberStyleArabic,

                      @NumberPosition = 28,35,

                      @Alignment = wdListLevelAlignLeft,

                      @TextPosition = 28,35,

                      @TabPosition = 28,35,

                      @ResetOnHigher = 0,

                      @StartAt = 1.

          modify word-ListTemplate, @Name = "".

          modify word-app, @Selection::Range::ListFormat::

                  ApplyListTemplate(word-ListTemplate, 0, 1, 1).

          modify word-app, @Selection::TypeText ="esto es".

          modify word-app, @Selection::TypeParagraph().

          MODIFY word-app, @Selection::TypeText ="Nada".