By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,071 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,071 IT Pros & Developers. It's quick & easy.

Setting Cursor after Mail Merge from Access 2003

P: 1
Hi,
this is my first time on this site!

I have a piece of code to transfer data from access -to a text file - to a word document. (maintaining - do not want to spend much time updating to more efficient code) I am looking to have the cursor at the end of the newly created word document after the merge is run. How can I do this

Set objWord=GetObject(, "Word.Application")
Set objDocs=objWord.Documents

Set objCurrent =objDocs.Open(strDocName)
objCurrent.Application.Visible=True

With objWord
.ActiveDocument.MailMerge.OpenDataSource NMAE:=strFile, _
SubType:=wdMergeSubTypeWord2000, Format:=weOpenFormatText
.ActiveDocument.MailMerge.Destination=wdSendToNewD ocument
.ActiveDocument.MailMerge.Execute
.Documents(strDocName).Close SaveChanges:=wdDoNotSaveChanges
End WIth

objDocs.Item(1).SaveAs("FILEWITHCURSORATEND")

Please help. Thanks

Lynn
Aug 12 '09 #1
Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,679
@lynnM
Reference one of the Move Methods (Move, MoveEnd) within Word.
Aug 13 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.