473,395 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Problem printing a hyperlink document

I'm trying to use a command button to print a Word document that is in a
Hyperlink field. I keep getting Run-Time Error 5273 and it says the
document name or path is not valid. The Hyperlink opens fine if I open it
manually but not with this code. Any ideas? I'm Access 2002 with WinXP and
all the latest updates. I do have Word Objects 10.0 selected under Tools
Reference.
Thanks,
Mike

Dim oApp As Object
Dim beginning As Single
'Hyper is the text box name that contains the hyperlink
Set oApp = CreateObject("Word.Application")
oApp.Documents.Open FileName:=Me.hyper.hyperlink.Address
oApp.PrintOut FileName:=""

'this will pause the code during 5 seconds, giving some time
'to Word app to send the document to the printer, before quit
'
beginning = Timer
Do While Timer < begining + 5
DoEvents
Loop

oApp.ActiveDocument.Close
oApp.Quit
Set oApp = Nothing
Nov 12 '05 #1
0 3076

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jeff Harbin | last post by:
I've got an ACCESS 2000 application that I'm developing. One of the outputs of this app will be to generate a series of 'jobs' which corresponds to a record in the database. Each record will be...
2
by: deko | last post by:
Is there a special syntax for hyperlinks in queries? I have a table of hyperlinked documents displayed in a subform datasheet. Clicking the hyperlink opens the document from the hard drive. I...
3
by: sloesch | last post by:
I am working with VS.net 2003, framework 1.1, developing with VB.net, and ASP.net, and I would like to know how you can create a dynamic hyperlink on the fly to a document stored in a SQL database?...
1
by: kkuniya | last post by:
Situation : - A form (method : POST, action : itself, onsubmit : alert 'Submit' ) - Got 2 submit button ( 'Save' , 'View') - Got navigation 1|2|3|4 What I want to do : - Once clicked on the...
4
by: tcole6 | last post by:
My problem appears to be Firefox specific. I have a hyperlink that loads a new window. This window contains hyperlinks that call javascript functions in the parent window and then closes the...
7
manuelgk
by: manuelgk | last post by:
I have another problem. I want to catch the click event, I put certain code and it works well with my code but with a little problem, I already catch the click event and the links too, but when I try...
0
by: accessdumbie | last post by:
We have a small amount of information in a Word Document that I would like to print in an Access Report. We have the location of the document for each individual record stored in a hyperlink field...
2
by: ssmeshack | last post by:
Hai all, Im having problem to set minimum height to <td> tag. It only takes height only not min-height. Im ie7 browser and developing web based system in Visual Web Deveploper 2008 (C# .Net). ...
10
by: sierra7 | last post by:
I'm trying to create a form where a user enters a document reference number and then clicks a command button to add a hyperlink to the document, via a file picker. Thanks to Adezii's excellent...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.