Word 2013 DDE conncetion change OpenDataSource Name

Joined
Jan 21, 2016
Messages
4
Reaction score
0
Hello,

I have connected Word / Excel files via DDE connection. It works very well. My problem is that the connection is lost if I copy these files together to other Folder or if I copy Folder with these files to somewhere...

After that I have to provide the connection again (repeatly). It's not effective for my job (there is no time).
When I use this VBA command in Word: MsgBox (ActiveDocument.MailMerge.DataSource.Name) I recieve dialog box with full path and name...
upload_2016-1-30_22-10-13.png

Also I found this VBA command how to change OpenDataSource: ActiveDocument.MailMerge.OpenDataSource Name:=ThisDocument.Path & "\SEZNAM.XLS", ReadOnly:=True, Connection:="Soukromé osoby" > but this is not for DDE > I need to change OpenDataSource for FileName = "SEZNAM.xls" and SheetName = "Soukromé osoby" or maybe change some options in Word/Excel? OLE connection is not good for this merge, I tryed it and there are more problems...

When I open Word via Excel VBA in other Folder (D:\ES PROJEKT_DDE_Office 2013\_POKUS) the path filename connection is the same like previous but not like other Folder therefore I would have to provide the connection again (repeatly).
upload_2016-1-30_22-11-37.png

upload_2016-1-30_22-16-5.png

upload_2016-1-30_22-16-49.png


:cool:

Thanks for your support and help in advance.

Jerry

p.s. sorry for my image in Czech language
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top