BET: Microsoft Word Mail Merge - VBA Code [PDF]

expression Required. An expression that returns a MailMerge object. InitialState - Required Variant. The number of the M

3 downloads 26 Views 34KB Size

Recommend Stories


membuat mail merge dengan microsoft office 20071
At the end of your life, you will never regret not having passed one more test, not winning one more

How To Mail Merge PDF Documents
At the end of your life, you will never regret not having passed one more test, not winning one more

PERTEMUAN 11 Membuat surat dengan Mail Merge Microsoft Word Tidak jarang sebuah surat
Sorrow prepares you for joy. It violently sweeps everything out of your house, so that new joy can find

Barrierefreie PDF aus Microsoft Word
Suffering is a gift. In it is hidden mercy. Rumi

Microsoft Word to PDF Guide
Those who bring sunshine to the lives of others cannot keep it from themselves. J. M. Barrie

Microsoft Word
The butterfly counts not months but moments, and has time enough. Rabindranath Tagore

Microsoft Word
Stop acting so small. You are the universe in ecstatic motion. Rumi

Microsoft Word
Your big opportunity may be right where you are now. Napoleon Hill

Idea Transcript


Microsoft Office Development and Consultancy

Home | Excel | VBA | C# | Finance | Tools | Newsletter | Feedback | Contact Word > Mail Merge > VBA Code > Wizard

< Previous | Next >

MailMerge.ShowWizard



Displays the Mail Merge Wizard in a document.





1 2 3 4 5 6 7

expression.ShowWizard(InitialState, _ ShowDocumentStep, _ ShowTemplateStep, _ ShowDataStep, _ ShowWriteStep, _ ShowPreviewStep, _ ShowMergeStep)



expression Required. An expression that returns a MailMerge object.



InitialState - Required Variant. The number of the Mail Merge Wizard step to display.



ShowDocumentStep - Optional Variant. True keeps the "Select document type" step in the sequence of mail merge steps. False removes step one.



ShowTemplateStep - Optional Variant. True keeps the "Select starting document" step in the sequence of mail merge steps. False removes step two.



ShowDataStep - Optional Variant. True keeps the "Select recipients" step in the sequence of mail merge steps. False removes step three.



ShowWriteStep - Optional Variant. True keeps the "Write your letter" step in the sequence of mail merge steps. False removes step four.



ShowPreviewStep - Optional Variant. True keeps the "Preview your letters" step in the sequence of mail merge steps. False removes step five.



ShowMergeStep - Optional Variant. True keeps the "Complete the merge" step in the sequence of mail merge steps. False removes step six.



This example checks if the Mail Merge Wizard is already displayed and, if it is, moves to the Mail Merge Wizard's sixth step and removes the fifth step from the Wizard.





8 9 10 11 12 13 14

Sub ShowMergeWizard() With ActiveDocument.MailMerge If .WizardState > 0 Then .ShowWizard InitialState:=6, ShowPreviewStep:=False End If End With End Sub



MailMerge.WizardState





Returns or sets a Long indicating the current Mail Merge Wizard step for a document. The WizardState method returns a number that equates to the current Mail Merge Wizard step; a zero (0) means the Mail Merge Wizard is closed. Read/write.





This example checks if the Mail Merge Wizard is already displayed in the active document and if it is, moves to the Mail Merge Wizard's sixth step and removes the fifth step from the Wizard.





15 16 17 18 19 20 21

Sub ShowMergeWizard() With ActiveDocument.MailMerge If .WizardState > 0 Then .ShowWizard InitialState:=6, ShowPreviewStep:=False End If End With End Sub

© Better Solutions Limited 12-Dec-2013



< Previous | Top | Next >

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.