Need Aspose methods to do the same things by word macro as below

Last post 10-06-2010, 5:12 AM by alexey.noskov. 3 replies.
Sort Posts: Previous Next
  •  10-04-2010, 10:13 PM 261848

    Need Aspose methods to do the same things by word macro as below (Platform: Microsoft Word)

    does it work for Aspose word dll ?
     
     
    Sub macro1()    ' set up BaseLineAlignment  as center for paragraph
        Selection.WholeStory
        With Selection.ParagraphFormat
            .LeftIndent = CentimetersToPoints(0)
            .RightIndent = CentimetersToPoints(0)
            .SpaceBefore = 0
            .SpaceBeforeAuto = False
            .SpaceAfter = 0
            .SpaceAfterAuto = False
            .LineSpacingRule = wdLineSpaceSingle
            .Alignment = wdAlignParagraphLeft
            .WidowControl = False
            .KeepWithNext = False
            .KeepTogether = False
            .PageBreakBefore = False
            .NoLineNumber = False
            .Hyphenation = True
            .FirstLineIndent = CentimetersToPoints(0)
            .OutlineLevel = wdOutlineLevelBodyText
            .CharacterUnitLeftIndent = 0
            .CharacterUnitRightIndent = 0
            .CharacterUnitFirstLineIndent = 0
            .LineUnitBefore = 0
            .LineUnitAfter = 0
            .AutoAdjustRightIndent = True
            .DisableLineHeightGrid = False
            .FarEastLineBreakControl = True
            .WordWrap = True
            .HangingPunctuation = True
            .HalfWidthPunctuationOnTopOfLine = False
            .AddSpaceBetweenFarEastAndAlpha = True
            .AddSpaceBetweenFarEastAndDigit = True
            .BaseLineAlignment = wdBaselineAlignCenter
        End With
    End Sub
     

    Sub macro2()  'vertical Orientation for Chinese 
        ActiveDocument.Range(Start:=ActiveDocument.Content.Start, End:= _
            ActiveDocument.Content.End).Orientation = _
            wdTextOrientationVerticalFarEast
    End Sub
    Filed under: aspose words issue
     
  •  10-05-2010, 9:34 AM 261996 in reply to 261848

    Re: Need Aspose methods to do the same things by word macro as below

    Hi

     

    Thanks for your inquiry. Could you please attach your input and expected output (after executing the macro) documents? Do you work with Asian documents? As far I know, BaseLineAlignment is an option of “Asian typography”.

    Most of option you can set through ParagraphFormat in Aspose.Words:

    http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.paragraphformat.html

     

    Best regards,


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  10-05-2010, 11:16 PM 262099 in reply to 261848

    Re: Need Aspose methods to do the same things by word macro as below

    Attachment: Present (inaccessible)

    dear sir,

    please see the attached. there are six files :

     

    1. open file:20101006-01.htm
      then save as   :20101006-01.doc

            i hope use aspose word dll to open 20101006-01.htm file then save as 20101006-01.doc, and i could keep no change in original format (font, two columns style, and color and paragraph format should perserve.......)

      2. open file :20101006-02.htm
          then save as:20101006-02.doc
          i would like to have the function like macro RunOrientation.vb (in 20101006-02.doc) to convert the paragraph Orientation as wdTextOrientationVerticalFarEast  (for Chinese)

      3.open file:20101006-03.htm
         then save as :20101006-03.doc
         i hope the format without change, for example the equation block should align center.

         i think the three lines in  macro handle such things 

            .AddSpaceBetweenFarEastAndAlpha = True
            .AddSpaceBetweenFarEastAndDigit = True
            .BaseLineAlignment = wdBaselineAlignCenter

     

     

    Best Regards,

    dennis

    Filed under: Aspose.words style
     
  •  10-06-2010, 5:12 AM 262152 in reply to 262099

    Re: Need Aspose methods to do the same things by word macro as below

    Hi

     

    Thank you for additional information.

     

    1. Unfortunately, Aspose.Words does not support text columns in HTML. So text columns will be lost upon importing your HTML. Your request has been linked to the appropriate issue. You will be notified as soon as it is supported.

     

    2. This option is called “Text Flow” in MS Word. Unfortunately, there is no way to set this option using Aspose.Words. Your request has been linked to the appropriate issue. You will be notified as soon as it is supported.

     

    3. Equations in your document are just images. So to center them, you should just specify align center of the parent paragraphs with these images.

     

    Best regards,


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
View as RSS news feed in XML