Re: Access VBA

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
>>>>
>>>>
>>>>
>
>


.



Relevant Pages

  • Re: Need help getting filepath information via File Dialog
    ... Doug Steele, Microsoft Access MVP ... gets uploaded from the file to the database, and the hyperlink to the file ... than selecting through the mapped drive. ... using is (where the Call function references a module that uploads data ...
    (microsoft.public.access.modulesdaovba)
  • Re: how do i do this - stream file
    ... the file extension of the file that they click on ... dialog for them when they click on the hyperlink. ... > when pressed, runs a script that calculates the signature of the file, ...
    (comp.lang.python)
  • RE: Hyperlink Warning
    ... Dave Hargis, Microsoft Access MVP ... "Rob" wrote: ... can set the property Is Hyperlink to yes and the textbox becomes a hyperlink ...
    (microsoft.public.access.formscoding)
  • Re: api0001 Dialog Box - VBA Assistance in Coding Save File functi
    ... Doug Steele, Microsoft Access MVP ... It is more to do with sending a Hyperlink of a filepath from ... original Mailmerge document, but there are definite instances where the ...
    (microsoft.public.access.modulesdaovba)
  • Re: linking to documents from reports
    ... Duane Hookom ... Microsoft Access MVP ... even when I choose the "Publish with Microsoft Word" from the reports ... Hyperlink reference not valid." ...
    (microsoft.public.access.reports)