I found the answer:
chNewDoc:fields:update.
/* Save the result of the Word merge. */
chWordApp:ActiveDocument:SaveAs("C:\Windows\Temp\" + save-as-name).
chNewDoc:CLOSE(FALSE).
/* Brian from Progress. */
RELEASE OBJECT chDoc.
RELEASE OBJECT chMerge.
RELEASE OBJECT chNewDoc...
I have a problem related to saveas. In the following code, I merge a document and then save it on my hard drive. (This savved document is attached to an email in other code.
All this works fine. The problem is that if there are 100 letters merged and saved, then the user then has 100 open Word...
I am using a progress program to create emails. That is working, but I need a further refinement:
I want the Progress program to specify the sender of the email .
Some of my code:
ASSIGN chmail:Subject = subject
chMail:Body = body
chMail:BCC =...
I know it is saving the document because the document saved under that name is open on my PC.
It would be better if the user did not have to close the document. It is used in creating another merge document, all of which needs to be a transparent to the user as possible.
I have tried...
I am sorry to say that neither of these actually closes the saved document. What they do is leave another instance of word running with nothing open in it. (If that gives you any kind of clue.)
Any other ideas? Thx
In a Progress program, I save a Word document (from a merge)
chWord:ActiveDocument:SaveAs( file-name-var )
Now this Word document is open on my PC. Is there a way that from the Progress program that I can close this document?
Thanks
DEFINE VARIABLE chWordApp AS COM-HANDLE NO-UNDO...
Here is the code I am using.
DEFINE VARIABLE chWordApp AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chDoc AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chMerge AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chNewDoc AS COM-HANDLE NO-UNDO.
&GLOBAL-DEFINE wdSendToNewDocument 0
CREATE "Word.Application"...
I have asked this before. I would be most grateful if I could see a Progress example of how to do this. Thanks.
I am doing a Word merge from a Progress program. When I put a merge variable in the heading, the merge does not put a value in it. The merge variables in the body work fine.
Funny...
I am doing a Word merge from a progress program. That works fine, but I need a way to save the merge result from the program. In the program it would save it as "c....mergeresult.docx". Is there a way to do this?
Thanks
I need a way, from a Progress program to see if a file is in a folder. I have the complete path and filename. How do I do this?
Thanks.
frm_filename has the complete path and filename.
CREATE "Word.Application" chWordApp.
chWordApp:ScreenUpdating = TRUE...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.