[AccessD] Automation of word

jwcolby jwcolby at colbyconsulting.com
Tue Feb 5 08:26:28 CST 2008


William,

Good idea.

No I haven't considered that but I suppose I need to.  The question really
is can I push code into a word doc like I can into an excel spreadsheet.
The problem is that there are hundreds of different docs and they are
created mostly by a specific person at the client's office.  I would need to
make sure that the code got into any document which I could only reliably do
by pushing the code in as the document template opened.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman
Sent: Tuesday, February 05, 2008 8:38 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Automation of word

JC

...have you considered handling the doc save functionality with vba in the
Word document template itself (post merge) rather than trying to do it from
Access.

William

----- Original Message -----
From: "jwcolby" <jwcolby at colbyconsulting.com>
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Sent: Tuesday, February 05, 2008 8:25 AM
Subject: Re: [AccessD] Automation of word


> Max,
>
> In this case the user selects from one of dozens of different documents
> specific to a type of disability claim for a specific disability insurance
> company.  These documents are things like request for medical records,
> notice of claim status, legal requests to lawyers, what have you.  So the
> user selects a specific document, then the people that will get a copy of
> the document, who the "to" is, and who are CCs etc.  They then click a
> "merge" button and the data required for that specific document is dumped 
> to
> the text file, Word is opened with that specific document loaded.  Word
> pulls the data from the text file and then MAY throw up prompts to the 
> user
> to fill in other data that is not in tables, but rather is in the claim
> processor's head (comment to the claimant etc).
>
> Once the claim processor has finished and is happy with the document, 
> (s)he
> prints the document and closes word.  Thus the process is a little more
> complex than just "open and print a document".
>
> What I am trying to accomplish now is to reliably get the document saved
> after being filled in, as well as reliably get Word closed.  This
> application is call center software.  My client, the user of the
> application, has invested in a system to scan all paper and get it into
> electronic format.  The claim is a paper file, the document just created 
> is
> printed, but the paper is never touched after being placed in the folder.
> All processing of the claim is done by looking at the document scans.  The
> entire claim is dumped to individual DVDs and those DVDs are sent to their
> client (large insurance companies).  The paper is sent to dead storage, it
> has to exist for legal reasons but it never has to be actually looked at.
>
> So... ATM the process of SAVING the document relies on the user to 
> actually
> do so.  The document HAS to be saved to a specific folder in order for the
> scan software to "see it".  That software will open all documents in a
> specific folder and import it into the document storage system, index it 
> by
> claim number etc.  But if the document does not get saved, then it does 
> not
> get into the electronic version of the claim.  ATM they take the paper 
> copy
> just printed, place it into a scanner and manually scan the paper into the
> system but that is labor intensive.  They do a thousand documents a day, 
> and
> they want to be able to reliably save the document into this special 
> folder
> and just let the doc storage do its thing without having to go through 
> that
> manual scan step.
>
> Additionally closing of the WORD application depends on the user.  I want 
> to
> gain control of the save and the close process.  Thus I want to lock Word
> open and force the user to click a button in Access so that my program can
> save the document close Word and release my pointer to word, log that I
> saved the document to doc storage etc.
>
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
> Sent: Tuesday, February 05, 2008 5:38 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Automation of word
>
> You can open Word and set it to background printing and then keep it open
> until printing is completed and then close it down.
> Is that what you are after?
> Max
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Monday, February 04, 2008 4:16 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Automation of word
>
> Rocky,
>
> In fact the method I am using is to export the data into t text file.  The
> word document is then "hard coded" to pull in data from that text 
> document.
> I just open the word document and it "just does it".  Of course I have to
> successfully export the data to the text file first.
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
> Beach Access Software
> Sent: Monday, February 04, 2008 10:32 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Automation of word
>
> John:
>
> Can't help you with that but I'm curious to know the code you're using to 
> do
> the merge.  I had a merge function and it used to work.  Now, for reasons 
> I
> have yet to be able to figure out it doesn't.  My code to open the 
> document
> and merge is only a few lines:
>
>    Dim objWordDoc As Word.Document
>    Dim objWord As Object
>
>    Set objWord = CreateObject("Word.Application")
>
>    With objWord
>        'Visible is set True in order to view the operation.
>        .Visible = True
>        .Documents.Open (strDocName)
>        .ActiveDocument.MailMerge.Destination = wdSendToNewDocument
>        .ActiveDocument.MailMerge.SuppressBlankLines = True
>        .ActiveDocument.MailMerge.Execute
>    End With
>
> It starts word and opens the document just fine but at
> .ActiveDocument.MailMerge.Destination = wdSendToNewDocument I get 
> requested
> object not available.
>
> How are you opening and merging your document?
>
> TIA
>
> Rocky
>
>
>
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Monday, February 04, 2008 6:49 AM
> To: 'Access Developers discussion and problem solving'
> Subject: [AccessD] Automation of word
>
> I have a rather elaborate mail merge system in a client's system.  ATM I
> open the document, merge the date and the user takes over, filling in 
> things
> that they need to fill in, then printing and closing the word instance. 
> It
> works well enough however I do not control the save of the document, and
> very occasionally Word does not close cleanly, leaving a hidden instance
> open WITH the associated merge text document open as well, preventing the
> next merge from occurring.
>
> I need to know if it is possible to open word in a mode that prevents it
> from being closed by the user?  I would then have the user go back to my
> application and press a button saying that they succeeded in doing the 
> mail
> merge.  I would save the document and close Word down.
>
> Can I prevent the user from closing Word?
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.19/1257 - Release Date: 2/3/2008
> 5:49 PM
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list