我试图用木单替换一字文件中一个清单的子弹,基本上只有要替换的“装饰”即。
www.un.org/spanish/ecosoc 以下清单替换子弹:
页: 1
这是另一个项目。
还有一个项目
<<>strong> with dashes:
— 页: 1
— 这是另一个项目。
— 还有一个项目
我会利用德尔菲的活性X来这样做,但VB的法典也会这样做。
我试图用木单替换一字文件中一个清单的子弹,基本上只有要替换的“装饰”即。
www.un.org/spanish/ecosoc 以下清单替换子弹:
页: 1
这是另一个项目。
还有一个项目
<<>strong> with dashes:
— 页: 1
— 这是另一个项目。
— 还有一个项目
我会利用德尔菲的活性X来这样做,但VB的法典也会这样做。
在<>Delphi内 法典:
uses ..., ComObj;
const
wdListNumberStyleBullet = 23;
var
vMSWord : variant;
Doc : Variant;
oListTemplate : Variant;
oListLevel : Variant;
iLoopTemplates, iMaxTemplates: Integer;
iLoopLevels, iMaxLevels : Integer;
begin
try
vMSWord := GetActiveOleObject( Word.Application );
vMSWord.Visible := True;
Doc := vMSWord.ActiveDocument;
iMaxTemplates := Doc.ListTemplates.Count;
for iLoopTemplates := 1 to iMaxTemplates do
begin
oListTemplate := Doc.ListTemplates.Item(iLoopTemplates);
iMaxLevels := oListTemplate.ListLevels.Count;
for iLoopLevels := 1 to iMaxLevels do
begin
oListLevel := oListTemplate.ListLevels.Item(iLoopLevels);
if (oListLevel.NumberStyle = wdListNumberStyleBullet)
and (oListLevel.NumberFormat = UTF8String(#61623))
and (oListLevel.Font.Name = Symbol ) then
// if (oListLevel.NumberStyle = wdListNumberStyleBullet) then
begin
oListLevel.NumberFormat := UTF8String( - );
oListLevel.Font.Name := Arial ;
end;
end;
end;
except
ShowMessage( Open a Word document before running this method );
end;
目前的<<><><>t>>正在检查它是否真的是一部?
如果你不需要这种检查,就应当对这一条线(if.)进行评论,并放弃下一个线......
这是你试图做的吗?
Option Explicit
~~> Select the relevant range before running this code
Sub Sample()
With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61485)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = InchesToPoints(0.25)
.Alignment = wdListLevelAlignLeft
.TextPosition = InchesToPoints(0.5)
.ResetOnHigher = 0
.StartAt = 1
.Font.Name = "Symbol"
.LinkedStyle = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(1), ContinuePreviousList:= _
False, ApplyTo:=wdListApplyToSelection, DefaultListBehavior:= _
wdWord10ListBehavior
End Sub
<>SNAPSHOT
从事工作的宏观......
Dim oListTemplate As ListTemplate
Dim oListLevel As ListLevel
For Each oListTemplate In ActiveDocument.ListTemplates
For Each oListLevel In oListTemplate.ListLevels
If oListLevel.NumberStyle = wdListNumberStyleBullet Then
With oListLevel
.NumberFormat = "-"
.Font.Name = "Arial"
End With
End If
Next oListLevel
Next oListTemplate
my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...
Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...
i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...
In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...
What is the equivalent of SetLength using Oxygene? I m trying to size an integer array. var listIndexes: array of integer; begin setLength(listIndexes,5); // doesn t work end;
How can I monitor or visualize memory fragmentation of a delphi application?
I have consistently had IDE problems in Delphi/C++Builder for years, with every version. I usually just reboot, recompile, etc. and move on. However, I keep seeing others say that the IDE is rock ...
I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...