Re: Access VBA
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Sun, 16 Oct 2005 11:40:08 -0400
Just realized this isn't strictly true.
If you open the document using the hyperlink, you can always get a reference
to that instance of Word using GetObject, and then use automation that way.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
news:uty3hdm0FHA.908@xxxxxxxxxxxxxxxxxxxxxxx
> Using a hyperlink lets you open the document in its registered program,
> and nothing else.
>
> Opening an instance of Word using CreateObject lets you use automation on
> the document.
>
> Which is better depends on what you're doing.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "David C. Holley" <DavidCHolley@xxxxxxxxxxxx> wrote in message
> news:%23XOMMDm0FHA.3856@xxxxxxxxxxxxxxxxxxxxxxx
>> Douglas -
>>
>> So what are the advantages of using this method, as opposed to creating
>> an instance of Word using CreateObject, opening the file and then
>> displaying it? I'm assuming that 1 of the advantages is that Access will
>> look at the file extension and open the correct application? Are there
>> others?
>>
>> Carlos Santos wrote:
>>> to open word doc i use:
>>>
>>> Command24.HyperlinkAddress = recordsetx.Fields(0)
>>>
>>> to close word doc i don't have any code
>>>
>>>
>>> "Douglas J. Steele" wrote:
>>>
>>>
>>>>What code are you using to open the document and to close it?
>>>>
>>>>--
>>>>Doug Steele, Microsoft Access MVP
>>>>http://I.Am/DougSteele
>>>>(no e-mails, please!)
>>>>
>>>>
>>>>
>>>>"Carlos Santos" <CarlosSantos@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>>>>message news:1E1915CA-A22E-48DF-92C5-166B488F8DC9@xxxxxxxxxxxxxxxx
>>>>
>>>>>hello, when i call from access a word document and i close it. it
>>>>>retuns a
>>>>>message "An unexpected error has occurred". Anyone can tell me how i
>>>>>eliminate that.
>>>>>Regards
>>>>>Carlos
>>>>
>>>>
>>>>
>
>
.
- References:
- Re: Access VBA
- From: Douglas J. Steele
- Re: Access VBA
- From: David C. Holley
- Re: Access VBA
- From: Douglas J. Steele
- Re: Access VBA
- Prev by Date: Re: Access VBA
- Next by Date: Re: Select Case for a Recordset(Please Help)
- Previous by thread: Re: Access VBA
- Next by thread: Re: Access VBA
- Index(es):
Relevant Pages
|