We are in the process of moving our VB6 application from MS Office 2002/2003 to Office 2010.
I would like to be ready when the move happen, so I tried to use code for both version:
Code:
With ObjWord
...
If .Application.Version < 13 Then
[green]'Office 2002 & 2003[/green]
.MailingLabel.CreateNewDocument Name:="5162", _
Address:="", AutoText:="ToolsCreateLabels1"
Else
[green]'Office 2010[/green][blue]
.MailingLabel.[highlight]CreateNewDocumentByID[/highlight] LabelID:="1359804673", _
Address:="", AutoText:="ToolsCreateLabels1", _
LaserTray:=wdPrinterManualFeed, _
ExtractAddress:=False, _
PrintEPostageLabel:=False, _
Vertical:=False[/blue]
End If
...
End With
Is there any way I can be ready for both versions of Office (2003 and 2010) in my VB 6 code for the transition time?
Have fun.
---- Andy