06-03-20 03:13 PM
Hi,
I am trying to pass some enumerations from Word VBA into a code stage using the Word VBO.
MS Word internal code is using some enumerations that are not recognised by VB code stages.
For example :
Dim doc as Object = GetDocument(Handle,documentname)
doc.MailMerge.OpenDataSource (DataSourceName, SQLStatement:="SELECT * FROM `ABC$`")
With doc.MailMerge
.Destination = wdSendToNewDocument
End With
Error message is wdSendToNewDocument is not declared. It may be inaccessible due to its protection level.
This issue only happen with enumerations starting by wd* (e.g : wdDefaultFirstRecord , wdDefaultLastRecord etc..).
Enumerations starting by wd* are specific to Word VBA.
Is there a workaround for this ?
09-03-20 09:29 PM
10-03-20 02:23 PM
13-03-20 11:55 AM
07-08-20 06:35 PM