Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: create word document form a record in a form

Geek News

create word document form a record in a form
Matt 12/18/2008 12:06:01 PM
Hi see below

Dim AppWord As New Word.Application

AppWord.Documents.Add "\\server\db_files\Templates\~BQPO.dot"

With AppWord
..ActiveDocument.ShowSpellingErrors = False

..Selection.GoTo wdGoToBookmark, Name:="bmkDesc"
If IsNull(Me!subformPurchaseDetail!Description) Then
..Selection.TypeText ""
Else:
..Selection.TypeText Me!subformPurchaseDetail!Description
End If
AppWord.Visible = True

End With

Hi

I am using this code to create a word document from the field data of an
access form using bookmarks in a word template. The form contains one record
from the purchase table however the purchase detail subform can have several
records from the purchase details table. This code will only show the first
entry of the descrition field in this subform in the word document. This
there any easy way of modifying the code so that it picks up the other
description entries. Hope this makes sense.


Thanks

Matt

Re: create word document form a record in a form
"Michael Lynch" <westgatetabernacle[ at ]yahoo.com> 12/21/2008 4:21:54 AM
I'M HAVING A PROBLEM WITH SETTING UP MY WINDOWS MAIL FROM MY LAPTOP THAT HAS
WIRELESS INTERNET BUILT IN TO IT. CAN SOMEONE HELP ME WITH THAT PROBLEM.
PLUS I NEED THE PROGRAM OF MICROSOFT OFFICE 2007 IN ENGLISH FORM. I HAVE THE
SPANISH VERISON THAT A PASTOR LET ME DOWNLOAD INTO MY LAPTOP AND THERE IS NO
TRANSLATION VERISON PROGRAM FOR IT.
"Matt" <Matt[ at ]discussions.microsoft.com> wrote in message
news:44352125-1B27-4F40-BABD-C8C5BE71E4ED[ at ]microsoft.com...
[Quoted Text]
> Hi see below
>
> Dim AppWord As New Word.Application
>
> AppWord.Documents.Add "\\server\db_files\Templates\~BQPO.dot"
>
> With AppWord
> .ActiveDocument.ShowSpellingErrors = False
>
> .Selection.GoTo wdGoToBookmark, Name:="bmkDesc"
> If IsNull(Me!subformPurchaseDetail!Description) Then
> .Selection.TypeText ""
> Else:
> .Selection.TypeText Me!subformPurchaseDetail!Description
> End If
> AppWord.Visible = True
>
> End With
>
> Hi
>
> I am using this code to create a word document from the field data of an
> access form using bookmarks in a word template. The form contains one
> record
> from the purchase table however the purchase detail subform can have
> several
> records from the purchase details table. This code will only show the
> first
> entry of the descrition field in this subform in the word document. This
> there any easy way of modifying the code so that it picks up the other
> description entries. Hope this makes sense.
>
>
> Thanks
>
> Matt
>

Re: create word document form a record in a form
"Mike Painter" <mddotpainter[ at ]sbcglobal.net> 12/21/2008 6:13:32 AM
Wrong group.
Try alt.I.have.pirated.software.



Michael Lynch wrote:
[Quoted Text]
> I'M HAVING A PROBLEM WITH SETTING UP MY WINDOWS MAIL FROM MY LAPTOP
> THAT HAS WIRELESS INTERNET BUILT IN TO IT. CAN SOMEONE HELP ME WITH
> THAT PROBLEM. PLUS I NEED THE PROGRAM OF MICROSOFT OFFICE 2007 IN
> ENGLISH FORM. I HAVE THE SPANISH VERISON THAT A PASTOR LET ME
> DOWNLOAD INTO MY LAPTOP AND THERE IS NO TRANSLATION VERISON PROGRAM
> FOR IT. "Matt" <Matt[ at ]discussions.microsoft.com> wrote in message
> news:44352125-1B27-4F40-BABD-C8C5BE71E4ED[ at ]microsoft.com...
>> Hi see below
>>
>> Dim AppWord As New Word.Application
>>
>> AppWord.Documents.Add "\\server\db_files\Templates\~BQPO.dot"
>>
>> With AppWord
>> .ActiveDocument.ShowSpellingErrors = False
>>
>> .Selection.GoTo wdGoToBookmark, Name:="bmkDesc"
>> If IsNull(Me!subformPurchaseDetail!Description) Then
>> .Selection.TypeText ""
>> Else:
>> .Selection.TypeText Me!subformPurchaseDetail!Description
>> End If
>> AppWord.Visible = True
>>
>> End With
>>
>> Hi
>>
>> I am using this code to create a word document from the field data
>> of an access form using bookmarks in a word template. The form
>> contains one record
>> from the purchase table however the purchase detail subform can have
>> several
>> records from the purchase details table. This code will only show the
>> first
>> entry of the descrition field in this subform in the word document.
>> This there any easy way of modifying the code so that it picks up
>> the other description entries. Hope this makes sense.
>>
>>
>> Thanks
>>
>> Matt


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net