[Migrated content. Thread originally posted on 26 September 2003]
Could anyone help me with translating of Vb codes for the Word Control below? I was able to do some but not all of them, ones with ???. Thanks_______________
Set wrdMailMerge = wrdDoc.MailMerge
'INQUIRE wrdDoc MailMerge IN wrdMailMerge.
Dim oAutoText As Word.AutoTextEntry
???
Set oAutoText = oApp.NormalTemplate.AutoTextEntries.Add("MyLabelLayout", oDoc.Content)
???
oDoc.Content.Delete
'Modify oDoc Content::Delete()
odoc.Mailmerge.MainDocumentType = wdMailingLabels
'Modify wrdMailMerge MainDocumentType = wdMailingLabels
odocMailmerge.OpenDataSource Name:=" name.txt"
'Modify wrddoc MailMerge::OpenDatasource("name.txt")
oApp.MailingLabel.CreateNewDocument Name:="5160", Address:="", AutoText:="MyLabelLayout", LaserTray:=wdPrinterManualFeed
'Modify wrdApp MailingLabel::CreateNewDocument( by name Name "5160" by name Address "" by name "MyLabelLayout" by name LaserTray wdPrinterManualFeed)
odoc.MailMerge.Destination = wdSendToNewDocument
'Modify wrdMailMerge Destination = wdSendToNewDocument
odoc.Execute
'modify wrdMailMerge Execute(1)
oAutoText.Delete
???
oDoc.Close False
'modify wrdDoc Close()
oApp.Visible = True
'Modify wrdApp @Visible = 1
oApp.NormalTemplate.Saved = True
???
____________________