I had a macro in Word 2003 that created some labels and I used the code in my VB 6 application.
Now we are moving to Word 2010, and my old macro does not work in Word 2010 any more. Fine, I will re-do it in Word 2010
In Word 2010, I have my Developer tab, I can record the macro:
Mailings – Start Mail Merge – Labels…
I can set Printer information, Label vendor (AVERY, US Letter), Product Number (5162 Easy Peel Address Labels) and then click OK. Labels are created, stop recording - life is good.
Now it’s the time to ‘steal’ code from new macro, use it in my VB application, and razzle-dazzle my boss.
All what I’ve got in my macro is one line:
Code:
Sub CreateLabels()[green]
' CreateLabels Macro[/green]
ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels
End Sub
And if I run the new macro in Word 2010 - it doesn't work, doesn't create any lables, doesn't do anything. :-(
What am I doing wrong?
Have fun.
---- Andy