我想经过一个Word文档,使用VBA,每次取式,将其保存到剪贴板中,打开一个新的空白文档,并进行保存为PDF文件。
我发现了两段代码,这应有助于我上手但也走得很远:
Sub get_eqns()
Dim eqns As OMath
Dim para As Paragraph
For Each eqns In ActiveDocument.OMaths
With eqns.Range.Select
'
'~~> Rest of the code
'
End With
Next
For Each para In ActiveDocument.Paragraphs
If para.Range.OMaths(1) = True Then
para.Range.OMaths(1).Range.Select
With Selection
.CopyAsPicture
End With
End If
Next
End Sub