好象拼音汉字在Ms Word是一个域,然后怎么控制一下,就能形成上面是拼音下面是汉字的一一对应输出了。但是我查了好久也没有想到怎么控制。
  请各位帮忙了,急用呀,谢谢!    最好能提供一些代码,或者相关的文章连接什么的,有个思路也成。在谢了!

解决方案 »

  1.   

    With Selection
            .Start = 396
            .End = 401
            .Range.PhoneticGuide Text:="dǎng", Alignment:= _
                wdPhoneticGuideAlignmentOneTwoOne, Raise:=15, FontSize:=7, FontName _
                :="宋体"
        End With
        With Selection
            .Start = 396
            .End = 396
            .Range.PhoneticGuide Text:="chǎn", Alignment:= _
                wdPhoneticGuideAlignmentOneTwoOne, Raise:=15, FontSize:=7, FontName _
                :="宋体"
        End With
        With Selection
            .Start = 396
            .End = 396
            .Range.PhoneticGuide Text:="gòng", Alignment:= _
                wdPhoneticGuideAlignmentOneTwoOne, Raise:=15, FontSize:=7, FontName _
                :="宋体"
        End With
        With Selection
            .Start = 396
            .End = 396
            .Range.PhoneticGuide Text:="guó", Alignment:= _
                wdPhoneticGuideAlignmentOneTwoOne, Raise:=15, FontSize:=7, FontName _
                :="宋体"
        End With
        With Selection
            .Start = 396
            .End = 396
            .Range.PhoneticGuide Text:="zhōng", Alignment:= _
                wdPhoneticGuideAlignmentOneTwoOne, Raise:=15, FontSize:=7, FontName _
                :="宋体"
        End With
    End Sub录制了一段宏,你可以自己看看
      

  2.   


      哦,谢谢。不过这个宏代码也不能让汉字和拼音上下联体。在delphi中也不知道怎么使用?
      

  3.   

    不知道你需要怎么样联体,另外如何在Delphi中控制Word你可以在网上搜索一下,肯定有关于使用宏的内容。
      

  4.   


     就是这样的联体呀。把汉字和拼音同时输入到word上,然后显示出上下对应关系。要连一起成为一行,而不是单独两行分开。
    wo men shi
    我  们  是  CSDN
      

  5.   

    //参考如下代码
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      WordApplication1.Disconnect;
      WordApplication1.Connect;
      WordApplication1.Visible := True;
      WordApplication1.Documents.Add(EmptyParam, EmptyParam, EmptyParam, EmptyParam);
      WordApplication1.Selection.Font.Size := 12;
      WordApplication1.Selection.InsertAfter('我们是CSDN');  WordApplication1.Selection.Start := 0;
      WordApplication1.Selection.End_ := 1;
      WordApplication1.Selection.Range.PhoneticGuide('wo', wdPhoneticGuideAlignmentOneTwoOne, 13, 12, '宋体');  WordApplication1.Selection.Start := 55;
      WordApplication1.Selection.End_ := 56;
      WordApplication1.Selection.Range.PhoneticGuide('men', wdPhoneticGuideAlignmentOneTwoOne, 13, 12, '宋体');  WordApplication1.Selection.Start := 111;
      WordApplication1.Selection.End_ := 112;
      WordApplication1.Selection.Range.PhoneticGuide('shi', wdPhoneticGuideAlignmentOneTwoOne, 13, 12, '宋体');
    end;
      

  6.   

    OFFICE2000开始提供一个拼音指南的功能,可以参考一下
    具体位置:格式--中文版式--拼音指南
      

  7.   

    zswang(伴水清清)(专家门诊清洁工) 不愧为四星级大虾,哈哈。