office交流網--QQ交流群號

Access培訓群:792054000         Excel免費交流群群:686050929          Outlook交流群:221378704    

Word交流群:218156588             PPT交流群:324131555

WPS相對於Office不支持的一些功能 方法 屬性 事件(逐步更新)

2021-01-27 08:00:00
zstmtony
原創
5640

在這幾年使用WPS的VBA開髮中,髮現WPS的VBA接口中有一些功能併未完全實現(tmtony, 先想到一些就列齣來

1.activesheet.chartobjects(1).chart.export activeworkbook.Path & "\test3.gif","gif"  gif在office支持,但wps不支持。 PNG JPG均支持

但註意Office,需要安裝 圖形篩選器,否則會提示 圖形篩選器無法轉換此文件

2.Wps用代碼生成圖錶及將圖錶轉換成圖片要比Office快很多。
3.Wps中對內容搜索Find也要比Office快很多,很奇怪

4.以下代碼在wps箇人版支持,在Wps政府專業版本中不支持:ChartTitle.Format.TextFrame2.TextRange.Characters(1, 6).ParagraphFormat

   Dim chrt As Object
 Set chrt = ActiveSheet.ChartObjects(1)
 With chrt.Chart.ChartTitle.Format.TextFrame2.TextRange.Characters(1, 6).ParagraphFormat
        .TextDirection = 1 ' msoTextDirectionLeftToRight
        .Alignment = 2 ' msoAlignCenter
    End With
    MsgBox "10"
    With chrt.Chart.ChartTitle.Format.TextFrame2.TextRange.Characters(1, 6).Font
        .BaselineOffset = 0
        .Bold = -1
        MsgBox "11"
        .NameComplexScript = "+mn-cs"
        .NameFarEast = "+mn-ea"
        .Fill.Visible = -1 ' msoTrue
        .Fill.ForeColor.RGB = RGB(89, 89, 89)
        .Fill.Transparency = 0
        .Fill.Solid
        MsgBox "12"
        .Size = 14
        .Italic = msoFalse
        .Kerning = 12
        .Name = "+mn-lt"
        .UnderlineStyle = 0 ' msoNoUnderline
        MsgBox "13"
        .Spacing = 0
        .Strike = 0 ' msoNoStrike
    End With



chart.export filename, "GIF"

oChart.Export(Server.MapPath("~/App_Data/Graphs/Graph2.gif"), "GIF")
Solution to this problem is in MSI installer to register aspnet account

to resolve your Problem go to c:\windows\system32\msi.dll
view properties
from security tab add aspnet account and give full permission to all
apply your setting

reboot your computer this should solve your problem.

if there is any problem go to event viewer of system and see what hkcu does not have permission. simply give permission to clsid
you may have to run dcomcfg.

分享