- 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...
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).
Thanks for your support and help in advance.
Jerry
p.s. sorry for my image in Czech language
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...
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).
Thanks for your support and help in advance.
Jerry
p.s. sorry for my image in Czech language