当我在VBA中将OLEObject(例如图像)添加到窗体的Richtextbox中时,将在显示该窗体之前打开应用程序/窗口(对于我的情况是mspaint)。
Private Sub UserForm_Initialize()
Dim sFlangeSketch As String
Dim oFlangeSketch As RichTextLib.OLEObject
sFlangeSketch = "C:\01.bmp"
Set oFlangeSketch = RichTextBox1.OLEObjects.Add(Source:=sFlangeSketch)
End Sub