Normal Topic WordMerge Problem "File Cannot Be Opened" (Read 643 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
WordMerge Problem "File Cannot Be Opened"
May 23rd, 2016 at 2:51pm
Print Post Print Post  
Note: This problem is local to one computer on the Sesame Server network. I've even upgraded it from Windows 7 to Windows 10 and the problem still exists.

Everytime I click the "WordMerge" button for a record, it allows me to choose the document, then I select "This Record Only" then I get this message:

FILE CANNOT BE OPENED.
THIS IS PROBABLY BECAUSE A MERGE DOCUMENT ATTACHED TO IT IS ALREADY OPENED.
CLOSE THE MERGE DOCUMENT(S) AND TRY AGAIN.

Usually when I get this message it's because a merge document is already open in Microsoft Word, and I simply have to close it. But in this case no word document is open.

Is this like an SQL cache or Microsoft Word cache issue? Is there a way to flush the cache?

Any tips or advice is greatly appreciated.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: WordMerge Problem "File Cannot Be Opened"
Reply #1 - May 23rd, 2016 at 3:08pm
Print Post Print Post  
This can happen if the user running Sesame does not have Write permission to the directory where the Data source is stored, or to the Data source file itself.

It can also happen if the directory where the programming is looking to write the Data source file, does not exist at the path specified. So check that the directory exists on that system. Also if it's a relative path, check the Start In of the Sesame icon.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: WordMerge Problem "File Cannot Be Opened"
Reply #2 - May 23rd, 2016 at 5:08pm
Print Post Print Post  
Not sure how to give Sesame write permission to the directory. But I did give the User account full control to the entire C:\Sesame2\ directory.

I also tried a few other things, disabling protected view, disabling file blocking in trust center, etc. At first it had said one of the files was locked but now it's not and read-only, but both documents are now fully editable. These are macro documents and this is running on Windows 10 Ultimate with Word 2016 (64 bit), I used the same setup on another computer and didn't have a problem.

This problem actually was occurring back when this was Windows 7 so I'm not sure the operating system has anything to do with it. But it did have the same version of Word 2016 (64 bit).

Tried clearing the document cache too, and there are no owner files opened. ($, etc.) Kind of stumped me, I know it's not the code, it's local to this computer.

I kind of think of permissions like read/write, but I gave full permissions. But there is a separate administrator account.

Anyways, hope I figure it out.
  
Back to top
 
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: WordMerge Problem "File Cannot Be Opened"
Reply #3 - May 24th, 2016 at 12:54pm
Print Post Print Post  
This is going to be unbelievable, and I'm surprised that I didn't try this before because I think I had this problem before, but it was an incredibly simple fix.

All I had to do was go into the WordMergeCommand (2.6) in the program layout (programming) of the form and change these two lines:

Code
Select All
var vDataPath as String  = "Docs\MergeData.txt" 

              

to

Code
Select All
var vDataPath as String  = "C:\Sesame2\Docs\MergeData.txt" 



and

Code
Select All
var vStartPath as string = "docs" 



to

Code
Select All
var vStartPath as string = "C:\Sesame2\Docs\" 



I'm not sure why making such a simple change as just indicating the direct/exact path makes all the difference on some computers/builds, but in this case it does.

Anyways, good luck out there and thanks for the help.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: WordMerge Problem "File Cannot Be Opened"
Reply #4 - May 24th, 2016 at 1:55pm
Print Post Print Post  
Check the Start In of the Sesame client icon. You will find it's different on the system that wasn't working, probably set to "C:\Sesame2\Program". Which means the relative path would end up in a different location("C:\Sesame2\Program\Docs" instead of "C:\Sesame2\Docs"). That's why I mentioned it in my first post.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: WordMerge Problem "File Cannot Be Opened"
Reply #5 - May 24th, 2016 at 7:08pm
Print Post Print Post  
Yeah, you're right, it is set to "C:\Sesame2\Program", sorry I didn't understand from before.
  
Back to top
 
IP Logged