Solved

WordPerfect won't save RTF format file to a Web Folder

Posted on 2006-12-01
18
1,556 Views
Last Modified: 2013-11-22
I have a web application that uses documents in RTF format. It opens them in either MS Word or WordPerfect. I have no problems with Word, but WordPerfect will NOT allow me to save files with an RTF format to a web folder. Actually, it does a couple of weird things. It first says the file exists and asks if I want to overwrite it, but the file does NOT exist already. The 2nd thing it does is when I try to save it, the save seems to work, then it gives me the Access Denied error message and wants me to save it again.

Some details:  The web application is written in Java and is running on Apache/Tomcat on my laptop. The web folder is being watched by another small application so when a RTF file gets saved there, it grabs it and moves it to a folder where it can find it later (a reference to the path and filename is stored in a database, so the location is critical).
The application saves the document first (in a folder based on document name / date), then it sends it to WordPerfect to open. The file is opened from a temporary folder on the local computer, so when saving, I have to do Save As and navigate to my web folder. This is not a problem, it's just inherent in the design of the web application.

WordPerfect will save it if I save it in WPD format, but the application can't use WPD format. It has to use RTF (long explanation as to why, but there's a good reason we need to use RTF). There is no security on this web folder that should prevent access.
There's something else happening that I can't figure out.

Can anyone tell me why I keep getting an Access Denied error?  I wonder if it has something to do with the issue that the application is grabbing the file very soon after it's saved (about 10-50 milliseconds I think).

Thanks.
Ron
0
Comment
Question by:weiroblpay
  • 8
  • 7
  • 3
18 Comments
 
LVL 31

Expert Comment

by:moorhouselondon
Comment Utility
1. Try getting WordPerfect to save it on the hard drive in RTF, then Close the file, then getting it to copy to the web folder: all using a Macro.  Otherwise get an External app to copy it to the Web Folder.

2. Check where your Document Backup directory is.  Force it to be on the local hard drive, in a folder separate from the ones used by the incoming document stream.  (This setting is in WordPerfect's Settings).

0
 
LVL 1

Author Comment

by:weiroblpay
Comment Utility
Good suggestions!  Do you mean use a WordPerfect Macro?  I don't have a lot of experience with WP macros, but I can work one out that will do it I think. Can a Macro be put on the toolbar as a button for easy access?

I'll try this out and report back.

Thanks.
0
 
LVL 31

Expert Comment

by:moorhouselondon
Comment Utility
Yes, you can Record a WordPerfect Macro rather than starting off with a blank one and typing in the commands yourself.  Try to start off in a position that is well-defined.  For instance you have just loaded WordPerfect.

The Macro can indeed be put onto the toolbar.  Righ-click on the Toolbar, choose Edit, choose the Macro tab and there's a button there for Adding a Macro.  
0
 
LVL 1

Author Comment

by:weiroblpay
Comment Utility
I've tried doing a macro, but get an error. Please advise if I should make this a separate question. This sounds like a good idea, but I guess I could use some help getting a macro that works.

Note:  http://localHost:8085/cmsDocs/autoFile is defined as a web folder on my computer.

I get an error whenever it's run:
File @PFDesktop\:internet\...\autoFile/Declin.rtf cannot be moved or copied onto itself.

movePath var = "http://localhost:8085/cmsDocs/autoFile/"
myFile var = "Declin.rtf"  (name of current doc)
myPath var = "C:\UPC"


Macro:
1. Application (WordPerfect; "WordPerfect"; Default!; "EN")
2. Assign(myPath; "C:\UPC\")
3. Assign(movePath; "http://localhost:8085/cmsDocs/autoFile/")
4. Assign(myFile; ?Name)
5. FileSave (Filename: myPath + myFile; ExportType: RTF!)
6. close()
7. FileMove (myPath + myFile; movePath + myFile)


The error happens on the line:  FileMove (myPath + myFile; movePath + myFile)

I've tried using FileCopy with the same results.

The file does get copied successfully onn line 5 and WP closes it, but then line 7 blows up.
Any idea what's going wrong here?

Thanks
0
 
LVL 31

Accepted Solution

by:
moorhouselondon earned 300 total points
Comment Utility
If this is not the most up to date version of WordPerfect, or is not patched up to date, there are known problems with saving documents on non-local drives.  What version of WP is this?
0
 
LVL 1

Author Comment

by:weiroblpay
Comment Utility
I'm using WP 11. I haven't added any patches for it since installing.
0
 
LVL 31

Expert Comment

by:moorhouselondon
Comment Utility
Visit www.corel.com to update WP, just to rule that out as the problem.
0
 
LVL 8

Assisted Solution

by:khobson
khobson earned 200 total points
Comment Utility
You have two issues to deal with here.
1. Timing - Use Wait(12) or so  after Close().  More efficient code is to loop until the file is closed.
2. Path - Web path makes no sense to the FileMove() and FileCopy() commands.  You may have more success if you use virtual drives.  You can set them manually or by a macro as I explained at wpu.  I've never tried it with web folders though.
http://www.wpuniverse.com/vb/showthread.php?threadid=4988

You can view your passed paramteters to debug by: MessageBox(;;movePath + myFile)

WP is seeing (movePath + myFile) as a Hypertext link of sorts.  This is why you see the @PFDesktop which crops up in HyperTextCreate().

0
 
LVL 1

Author Comment

by:weiroblpay
Comment Utility
OK, here's the macro with the changes ...

Application (WordPerfect; "WordPerfect"; Default!; "EN")
Assign(myPath; "C:\UPC\")
Assign(myFile; ?Name)
Assign(oldFile; myPath + myFile)
FileSave (Filename: myPath + myFile; ExportType: RTF!)
close()
wait(12)
//* create a mapped drive to the movePath
DLLCall Prototype WinExec("kernel32.dll";"WinExec";DWord!;{AnsiString(lpCmdLine);nCmdShow})
WinExec("subst m: http://localhost:8085/cmsDocs/autoFile/";0)
// copy file to m
FileMove (oldFile; "m:\")
wait(10)
winExec("subst m: /D";0)


The subst command does NOT recognize a web folder. It says it can't find it, so a drive M is never created.

So I'm back to why WP won't copy or move a file to a web folder. I'll get the latest service packs (I have WP 11, SP1 installed - I see that there is SP 2 and 3 too, so I'll try those and see what I get.)

Any other suggestions are welcome.

Thanks,

Ron
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 8

Assisted Solution

by:khobson
khobson earned 200 total points
Comment Utility
Is the web folder already setup?  Can you drag and drop files?

UNC paths like \\matpc1\myfiles should work fine.  I am thinking that the problem lies with the http://... types of paths.  

Do you know how to map network drives manually?  Right click My Computer or add via Windows Explore.  If it can't be done then a macro method would not work either.
0
 
LVL 31

Expert Comment

by:moorhouselondon
Comment Utility
Don't forget that WPD files work fine.  It is only RTF files that have a problem.
0
 
LVL 31

Expert Comment

by:moorhouselondon
Comment Utility
As an experiment: save to a WPD within your Macro.  Does this work?
0
 
LVL 1

Author Comment

by:weiroblpay
Comment Utility
WPD files may work, but with our application, it has to be RTF because the application can't deal with WPD or DOC files. It has to work with basic text format files to be more generic.

khobson:  The web folder is already set up on the computer, but it is in the http://... format. I can't create a mapped drive manually with a web folder. That would have been a good solution, but Windows won't let me. I guess that's why the macro can't handle it.

I can build a program that will take a file and can copy it to the web folder, but we were hoping to avoid needing to install any programs on the client computers. That was one of the reasons we designed a web application. I think it's goofy that WordPerfect won't save to a web folder, but MS Word has no problem with it.

Do you know if a more current version (WP 12 or 13) would work?  I'm getting ver. 12 later this week. I guess I'll try it and see.
I really appreciate your help. This has been a nightmare.

Any more ideas would be appreciated.

Thanks,

Ron
0
 
LVL 8

Expert Comment

by:khobson
Comment Utility
From the looks of it to me, you are not able to use PerfectScript commands to copy any file to a web folder with an http path.

The problem is that the PerfectScript commands were designed for the UNC or standard paths for saving.  Try a copy from a DOS prompt.  If that works, you can use AppExecute() to do the job.  If you know of a DLL command that does it, you can use PerfectScript to do the DLL command by DLLCALL().

You say MSWord can do this?  Do you have example vba code?
0
 
LVL 31

Expert Comment

by:moorhouselondon
Comment Utility
>WPD files may work, but with our application, it has to be RTF because the application can't deal with WPD or DOC files. It has to work with basic text format files to be more generic.

I mentioned "As an experiment".  It would be helpful to see if the macro works using WPD.  Whether or not it works may help identify a way round this problem.
0
 
LVL 1

Author Comment

by:weiroblpay
Comment Utility
I can't save it using a DOS prompt either. When I use copy, I get an error that http: is not a recognized device. If I use xcopy, it asks if http://.... is a directory or a file. If I respond directory, it creates a directory called http:.... under the source folder and copies it there. If I respond it's a file, it gives me an error saying Invalid path.
So it looks like the copy won't work in any case.

When I save the same file using MS Word, I don't need any VBA, I just use the file save dialog and select the web folder under My Network Places. I can do the same thing in WordPerfect, but it gives me an error saying Access Denied.

The macro doesn't work using WPD and it also doesn't work directly from WordPerfect using the File Save dialog and selecting the web folder under My Network Places.

I'm going to try WP 12 and see what happens, but it doesn't look like WP supports saving to a web folder.

I've searched all over the web trying to find answers to this and can't get it. Even Corel's website has no reference to this issue that I can find.

Anyway, any more thoughts are appreciated.

Thanks
0
 
LVL 31

Assisted Solution

by:moorhouselondon
moorhouselondon earned 300 total points
Comment Utility
If it doesn't save using WPD format then this facility is not supported on this version.  You will either need to look at upgrading WP to a version that supports this functionality, or using a program that will call WordPerfect with a command line setting which invokes a Macro.  This Macro does whatever is needed within WordPerfect.  The program then saves the document saved by WordPerfect (it can save it in My Documents, say), then posts it into the web folder.  This will work, provided you have access to programming tools such as Delphi.  I get the impression that you or your colleagues have the resources to produce a program such as this.  It can be knocked up within a couple of hours.
0
 
LVL 1

Author Comment

by:weiroblpay
Comment Utility
Thanks for all your help. I used an updated version of WordPerfect and it resolved most of the problems.

It stil does one weird thing - it saves the document OK, but gives me an Access denied message AFTER saving it.  
I think that is because when I do a Save AS it tries to open it up again from where it was saved.

The problem is that our application is sweeping the saved directory and moving it to a location on the server that it stores all documents in, so when WP tries to open it in the just saved location, it gets an error saying Access denied - not sure why.

Anyway, I think with the suggestions you gave I'll be able to finally solve it, so I'm awarding points to both of you who gave good suggestions.

Thanks,

Ron
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
The viewer will learn how to edit the master slide. They will also learn how to combine multiple themes into one master slide to use them in their presentation.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now