Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Word macro to code
Message
De
07/10/2008 16:07:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Convert Word macro to code
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01353435
Message ID:
01353435
Vues:
72
Hello,

I have created a macro in Word I need to work into some existing code. I basically just copied it in and as you can imagine, it found errors everywhere! I'm not surprised, but grateful I can turn to all of you. The following is what was created in Word (and does not give me insight into how to start Word either):

Sub guestlabels()
'
' guestlabels Macro
' Macro recorded 10/7/2008 by Martha Kroll
'
ChangeFileOpenDirectory "C:\byteworks\gmr\lunches\"
Documents.Open FileName:="GUESTLABELS.DOC", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
End Sub

My customer is frustrated trying to deal with a mail merge and my intent is to remove their need to be involved in that part of the process.

Any suggestions as to how to work this into my code would be greatly appreciated.

Thanks so much,
Martha Kroll
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform