473,387 Members | 1,420 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,387 software developers and data experts.

open and print files with vba?

Is there a way to open and/or print a saved file (.doc, .pdf, .xls, etc)
using VBA?

something like...

Call Shell(strInvoicePath, OpenFile)

or

Call Shell(strInvoicePath, PrintFile)

?

Thanks in advance.

Jan 26 '06 #1
2 6007
On Wed, 25 Jan 2006 19:52:02 -0800, "deko" <de**@nospam.com> wrote:

Yes. Use the ShellExecute API.
http://www.mvps.org/access/api/api0018.htm

-Tom.

Is there a way to open and/or print a saved file (.doc, .pdf, .xls, etc)
using VBA?

something like...

Call Shell(strInvoicePath, OpenFile)

or

Call Shell(strInvoicePath, PrintFile)

?

Thanks in advance.


Jan 26 '06 #2
> Yes. Use the ShellExecute API.
http://www.mvps.org/access/api/api0018.htm


That does the trick. I was thinking there was some vba function, but that
api function is fine.

Thanks for the tip.

Jan 26 '06 #3

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

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
6
by: Shimon Sim | last post by:
Hi 1) Is it possible to force browser to open image in default windows application? That is what specifies in Folder Options for jpg extension. 2) Also if the 1) is possible is it possible to...
0
by: karinya_89 | last post by:
I want to print more than one XML file at a time i.e. the user click OK in ShowPrintDialog() only once and all the XML files in a folder are printed out. Now i can print only one XML file at a...
14
by: Rochester | last post by:
Hi, I just found out that the general open file mechanism doesn't work for named pipes (fifo). Say I wrote something like this and it simply hangs python: #!/usr/bin/python import os
3
by: Andres Corrada-Emmanuel | last post by:
Hello, I have installed PIL 1.1.5 on Windows with Python 2.4. I'm unable to open .tiff images that I can open and view using Windows Explorer. In other words, this simple test fails: import...
7
by: stan.kolker | last post by:
HI, I am just trying to open vss: try SourceSafeTypeLib.IVSSDatabase vssDb = new VSSDatabaseClass(); vssDb.Open(@"C:\Program Files\Microsoft Visual...
6
by: massimo s. | last post by:
Hi, Python 2.4, Kubuntu 6.06. I'm no professional programmer (I am a ph.d. student in biophysics) but I have a fair knowledge of Python. I have a for loop that looks like the following : ...
0
by: Ofelia | last post by:
Hi, I'm new to this forum and to Perl language but I would like to ask for your help. I'm working in Linux and the files I need to process are in the format “file.gz”. I created a script which...
1
by: sunnyluthra1 | last post by:
Hi Everyone, I am working on a piece of code, that displays the properties(Name, Datatype, size & Description) of the table in the database. Now I want to further Enhance the code. I Have created...
5
by: bvidinli | last post by:
is there a way to find out if file open in system ? - please write if you know a way other than lsof. because lsof if slow for me. i need a faster way. i deal with thousands of files... so, i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.