Opening .doc files from IFS

Hi,
I have a question about some functionality in the default web package with ifs. It is probably quite basic, but I am having difficulty with it. In the out of the box web ui, if I click on an uploaded .doc file, Microsoft Word gets loaded in my browser with the file openned.
I am using the JAVA API, and I have uploaded and foldered a .doc file. When I click on it, href="//computer/path/file.doc" word opens, but I get the file was not found.Any ideas?? Thank you.
Ian

Ian
The decision on which application the browser runs is taken by the browser based on information supplied in the HTTP response.
Here's an updated version of the RenderContent method that gives you some degree of control over this process...
// $Header$
* Please complete these missing tags
* @author
* @rref
* @copyright
* @concurrency
* @see
package ifs.pm.common.jsp;
import oracle.ifs.adk.http.HttpUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletInputStream;
import oracle.ifs.beans.Selector;
import oracle.ifs.beans.Format;
import java.util.Enumeration;
import java.util.Locale;
import java.net.URLEncoder;
import java.lang.Class;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import oracle.ifs.adk.security.IfsHttpLogin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.File;
import ifs.pm.common.trace.Alert;
import oracle.ifs.beans.LibraryObject;
import oracle.ifs.beans.ClassObject;
import oracle.ifs.beans.Document;
import oracle.ifs.beans.LibraryObjectDefinition;
import oracle.ifs.beans.Attribute;
import oracle.ifs.common.AttributeValue;
import oracle.ifs.beans.PublicObject;
import oracle.ifs.beans.FolderPathResolver;
import oracle.ifs.beans.LibrarySession;
import oracle.ifs.common.IfsException;
import oracle.ifs.beans.LibraryService;
import oracle.ifs.beans.LibrarySession;
import oracle.ifs.common.CleartextCredential;
import oracle.ifs.common.ConnectOptions;
import java.util.Hashtable;
import java.util.Date;
import java.text.SimpleDateFormat;
public class JspHelper extends Object
public static final String ACTION = "Action";
public static final String OPERATION = "Operation";
public static final String POLICY = "Policy";
public static final String MIMETYPE = "MimeType";
public static final String OPEN = "Open";
public static final String DOWNLOAD = "Download";
public static final String RENDER = "Render";
public static final String WEBLOGON = "/Login";
public static final String USERNAME = "username";
public static final String PASSWORD = "password";
public static final String SERVICE = "service";
public static final String SCHEMA_PASSWORD = "schemapassword";
public static final String IFSHTTPLOGIN = "IfsHttpLogin";
public static final String IFSWEBROOT = "/ifs/webui";
public static final String IFSTIMEOUT_URL = "/html/timeout.html";
private static String m_ServletPath = null;
private static final boolean DEBUG = true;
private static final String OPEN_SAVEAS_DIALOG = "oracleifs/download";
* Please complete the missing tags for JspHelper
* @param
* @return
* @throws
* @pre
* @post
private static Hashtable characterEncoding = new Hashtable();
static {
characterEncoding.put("+","%2B");
characterEncoding.put("#","%23");
characterEncoding.put("&","%26");
characterEncoding.put(" ","%20");
characterEncoding.put("'","%27");
characterEncoding.put(":","%3A");
characterEncoding.put("(","%28");
characterEncoding.put(")","%29");
characterEncoding.put("-","%2D");
private static String getServletPath()
return m_ServletPath;
public static String generateURL(Long id)
// Creates an Encoded URL from a Docid
String url = "";
if (getServletPath() != null) {
url = getServletPath();
url = url + "/";
url = url + (String) characterEncoding.get(":");
url = url + id.toString();
return url;
public static String generateURL(String path)
// Creates an Encoded URL from a Docid
String url = "";
if (getServletPath() != null) {
url = getServletPath();
if (!path.startsWith("/")) {
url = url + "/";
url = url + encodePath(path);
return url;
private static void setupServletPath(HttpServletRequest req)
// If never initialized, get the servlet path and store
// in the static
if ( null == m_ServletPath )
String contextPath = null;
String servletPath = "";
// Start with an empth string
m_ServletPath = "";
//let's figure out whether we're running under Servlet API 2.2
//or an earlier version
Class c = req.getClass();
try
//getContextPath() is first defined in 2.2
Method m = c.getMethod("getContextPath", null);
contextPath = (String)m.invoke(req, null);
catch (NoSuchMethodException e1)
catch (InvocationTargetException e2)
catch (IllegalAccessException e3)
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): contextPath = " + contextPath);
servletPath = req.getServletPath();
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): servletPath = " + servletPath);
if ( null != contextPath )
m_ServletPath = contextPath;
if ( null != servletPath )
m_ServletPath += servletPath;
else
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): not first time through.");
if (DEBUG) {
Alert.log ("JspHelper.setupServletPath(): m_ServletPath = " + m_ServletPath);
private static String getReposPath( HttpServletRequest request )
String result = null;
String path = request.getParameter(DOCUMENT_PATH);
if (null == path) {
path = request.getParameter(ALTERNATIVE_PATH);
return getReposPath(path);
public static String getReposPath(String path)
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Initial Path = " + path);
if (path != null) {
if ( ( null != getServletPath() ) && path.startsWith(getServletPath())) {
path = path.substring(getServletPath().length());
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Stripped Path = " + path);
path = undoSubstitutions(path);
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Converted Path = " + path);
if (DEBUG) {
Alert.log("JspHelper.getReposPath(request) Final Path = " + path);
return path;
public static String encodePath(String path)
// Substitute '%', then everything else
path = replaceString(path,"%","%25");
return doSubstitutions(path);
public static String decodePath(String path)
path = undoSubstitutions(path);
return replaceString(path,"%25","%");
public static String doSubstitutions(String path)
String encodedPath = path;
Enumeration keys = characterEncoding.keys();
while (keys.hasMoreElements()) {
String source = (String) keys.nextElement();
String target = (String) characterEncoding.get(source);
encodedPath = replaceString(encodedPath,source,target);
return encodedPath;
public static String undoSubstitutions(String path)
String encodedPath = path;
Enumeration keys = characterEncoding.keys();
while (keys.hasMoreElements()) {
String source = (String) keys.nextElement();
String target = (String) characterEncoding.get(source);
encodedPath = replaceString(encodedPath,target,source);
return encodedPath;
public static String getReposPath( HttpServletRequest request )
return HttpUtils.getIfsPathFromJSPRedirect(request);
public static String generateURL(HttpServletRequest request, Long id)
return HttpUtils.getURLFromIfsPath(request,":" + id.toString());
public static String generateURL(HttpServletRequest request, String path)
return HttpUtils.getURLFromIfsPath(request,path);
public JspHelper()
IfsException.setVerboseMessage( true );
* Please complete the missing tags for getArgumentAsString
* @param
* @return
* @throws
* @pre
* @post
public static String getArgumentAsString( Object arg )
if( null == arg )
return "";
else
return arg.toString();
* Please complete the missing tags for getArgumentAsString
* @param
* @return
* @throws
* @pre
* @post
public static String getArgumentAsString( String formatMask, Date arg )
if( null == arg )
return "";
else
SimpleDateFormat sdf = new SimpleDateFormat( formatMask );
return sdf.format( arg );
* Please complete the missing tags for getSession
* @param
* @return
* @throws
* @pre
* @post
public static LibrarySession getSession( HttpServletRequest request, HttpServletResponse response )
throws IfsException
if( DEBUG )
Alert.log( "getSession(request,response): Entering Method." );
dumpServletParameters( request );
// setupServletPath(request);
LibrarySession ifsSession = null;
HttpSession httpSession = request.getSession( true );
if( null != httpSession )
IfsHttpLogin ifsLogin = ( IfsHttpLogin ) httpSession.getValue( IFSHTTPLOGIN );
if( ifsLogin != null )
ifsSession = ifsLogin.getSession();
if( null == ifsSession )
try
// String timeoutPath = generateURL(request,getTimeOutURL());
String timeoutPath = HttpUtils.getURLFromIfsPath( request, getTimeOutURL() );
if( DEBUG )
Alert.log( "getSession(request,response): Unable to get a valid Session = assuming Timeout problem. Redirecting to " + timeoutPath );
response.sendRedirect( timeoutPath );
catch( IOException ioe )
throw new IfsException( 9999, ioe );
return ifsSession;
* Please complete the missing tags for getObject
* @param
* @return
* @throws
* @pre
* @post
public static PublicObject getObject( HttpServletRequest request, HttpServletResponse response )
throws IfsException
// Will return null and set a Redirect to the Timeout Page if the Sesssion
// is null.
String path = null;
PublicObject po = null;
LibrarySession ifsSession = getSession( request, response );
if( null != ifsSession )
// path = getReposPath(request);
path = HttpUtils.getIfsPathFromJSPRedirect( request );
if( path.charAt( 1 ) == ':' )
Long docId = new Long( path.substring( 2 ) );
po = ifsSession.getPublicObject( docId );
else
FolderPathResolver fpr = new FolderPathResolver( ifsSession );
fpr.setRootFolder();
po = fpr.findPublicObjectByPath( path );
if( DEBUG )
Alert.log( "getObject(request,response): Object is a " + po.getClassname() );
po = po.getResolvedPublicObject();
return po;
* Please complete the missing tags for getExtendedAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getExtendedAttributeValues( LibraryObject lo, HttpServletRequest request )
throws IfsException
// Returns a Library Object Definition containing the Attribute Values for each
// Extended Attribute which appears as a parameter in the request obvject.
ClassObject co = lo.getClassObject();
Attribute [] attributes = co.getExtendedClassAttributes();
return getAttributeValues( attributes, request );
* Please complete the missing tags for getEffectiveAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getEffectiveAttributeValues( LibraryObject lo, HttpServletRequest request )
throws IfsException
// Returns a Library Object Definition containing the Attribute Values for each
// Extended Attribute which appears as a parameter in the request obvject.
ClassObject co = lo.getClassObject();
Attribute [] attributes = co.getEffectiveClassAttributes();
return getAttributeValues( attributes, request );
* Please complete the missing tags for getAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getAttributeValues( Attribute [] attributes, HttpServletRequest request )
throws IfsException
LibraryObjectDefinition def = new LibraryObjectDefinition();
if( attributes != null )
for( int i = 0; i < attributes.length; i++ )
AttributeValue av = getAttributeValue( attributes [ i ], request );
if( av != null )
def.setAttribute( av );
return def;
* Please complete the missing tags for getAttributeValue
* @param
* @return
* @throws
* @pre
* @post
public static AttributeValue getAttributeValue( Attribute attribute, HttpServl etRequest request )
throws IfsException
AttributeValue av = null;
String name = attribute.getName();
String newValue = request.getParameter( name );
if( newValue != null )
if( newValue.equals( "" ) )
av = AttributeValue.newNullAttributeValue( attribute.getDataType() );
else
av = AttributeValue.newAttributeValue( newValue );
av.setName( name );
return av;
* Please complete the missing tags for downloadContent
* @param
* @return
* @throws
* @pre
* @post
public static void downloadContent( HttpServletRequest request, HttpServletResponse response )
throws IfsException
boolean download = false;
String action = request.getParameter( ACTION );
if( action != null )
if( action.equals( DOWNLOAD ) )
download = true;
Alert.log( "JspHelper.downloadContent(): download = " + download );
try
Document doc = ( Document ) JspHelper.getObject( request, response );
OutputStream os = response.getOutputStream();
if( download )
response.setContentType( OPEN_SAVEAS_DIALOG );
response.setHeader( "Content-Disposition", "attachment; filename=" + doc.getName() );
else
response.setContentType( doc.getFormat().getMimeType() );
response.setHeader( "Content-Disposition", "inline; filename=" + doc.getName() );
response.setContentLength( ( int ) doc.getContentSize() );
InputStream is = doc.getContentStream();
byte [] bytesRead = new byte [ 1024 ];
for( int byteCount = is.read( bytesRead, 0, bytesRead.length );
byteCount > 0;
byteCount = is.read( bytesRead, 0, bytesRead.length ) )
os.write( bytesRead, 0, byteCount );
catch( Exception e )
throw new IfsException( 9999, e );
* Please complete the missing tags for dumpServletParameters
* @param
* @return
* @throws
* @pre
* @post
public static void dumpServletParameters( HttpServletRequest request )
// setupServletPath(request);
Enumeration parmList = request.getParameterNames();
Alert.log( "Parameter List:" );
while( parmList.hasMoreElements() )
String parmName = ( String ) parmList.nextElement();
Alert.log( " " + parmName );
Alert.log( "Parameter Processing Completed." );
* Please complete the missing tags for obtainSession
* @param
* @return
* @throws
* @pre
* @post
public static LibrarySession obtainSession( HttpServletRequest request, HttpServletResponse response )
throws IfsException
if( DEBUG )
Alert.log( "obtainSession(request,response): Servlet Parameters = " );
dumpServletParameters( request );
// setupServletPath(request);
HttpSession httpSession = request.getSession( true );
if( httpSession != null )
IfsHttpLogin ifsLogin = ( IfsHttpLogin ) httpSession.getValue( IFSHTTPLOGIN );
if( ifsLogin != null )
LibrarySession ifsSession = ifsLogin.getSession();
if( ifsSession != null )
return ifsSession;
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Unable to get Session. - Attempting to create new Session" );
LibrarySession ifs = null;
String username = "guest";
String password = "welcome";
String service = "IfsDefault";
String schemaPassword = "manager";
String suppliedUsername = request.getParameter( USERNAME );
String suppliedPassword = request.getParameter( PASSWORD );
String suppliedService = request.getParameter( SERVICE );
String suppliedSchemaPassword = request.getParameter( SCHEMA_PASSWORD );
if( suppliedUsername != null )
username = suppliedUsername;
if( suppliedPassword != null )
password = suppliedUsername;
if( suppliedService != null )
service = suppliedService;
if( suppliedSchemaPassword != null )
schemaPassword = suppliedSchemaPassword;
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Creating new Session." );
Alert.log( " Username = " + username );
Alert.log( " Password = " + password );
Alert.log( " Service = " + service );
Alert.log( " Schema Password = " + schemaPassword );
LibraryService ifsService = new LibraryService();
CleartextCredential me = new CleartextCredential( username, password );
ConnectOptions connect = new ConnectOptions();
connect.setLocale( Locale.getDefault() );
connect.setServiceName( service );
connect.setServicePassword( schemaPassword );
LibrarySession ifsSession = ifsService.connect( me, connect );
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Session Created." );
JspLogin login = new JspLogin();
login.setSession( ifsSession );
httpSession.putValue( IFSHTTPLOGIN, login );
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Login Object Saved." );
return ifsSession;
* Please complete the missing tags for replaceString
* @param
* @return
* @throws
* @pre
* @post
public static String replaceString( String string, String string1, String string2 )
int offset = string.indexOf( string1 );
switch( offset )
case - 1 :
return string;
case 0 :
return string2 + replaceString( string.substring( string1.length() ), string1, string2 );
default:
return string.substring( 0, offset ) + string2 + replaceString( string.substring( offset + string1.length() ), string1, string2 );
* Please complete the missing tags for printLink
* @param
* @return
* @throws
* @pre
* @post
public static void printLink( javax.servlet.jsp.JspWriter out,
String name,
String url,
String color )
throws java.io.IOException
if( null != url )
if( url.indexOf( "http://" ) != 0 )
url = "http://" + url;
out.println( "<BR><A HREF=\"" + url + "\"><FONT COLOR=\"" + color + "\"><B>" + name + "</B></FONT></A>" );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
String dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
out.println( "<FONT COLOR=\"" + titleColor + "\">" + titleValue + ": </FONT> <FONT COLOR=\"" + dataColor + "\"><B>" + dataValue + "</B></FONT><BR>" );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Integer dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Boolean dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Date dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for renderContent
* @param
* @return
* @throws
* @pre
* @post
public static void renderContent( HttpServletRequest request, HttpServletResponse response )
throws IfsException
Document doc = ( Document ) JspHelper.getObject( request, response );
boolean download = false;
boolean renderedOutput = false;
String mimeType = null;
// Determine if we are opening or Downloading Content based on Action
String action = request.getParameter( ACTION );
if( action != null )
if( action.equals( DOWNLOAD ) )
download = true;
if( DEBUG )
Aler t.log( "JspHelper.downloadContent(): download = " + download );
// Determine is we want Raw or Rendered Content. For Rendered Content both
// Operation and Policy must be supplied.
String operation = request.getParameter( OPERATION );
String policy = request.getParameter( POLICY );
if( ( null != operation ) && ( null != policy ) )
renderedOutput = true;
if( DEBUG )
Alert.log( "JspHelper.downloadContent(): renderedOutput = " + renderedOutput );
// Determine if contentType comes from Document or is supplied explicity.
mimeType = request.getParameter( MIMETYPE );
if( null == mimeType )
mimeType = doc.getFormat().getMimeType();
if( DEBUG )
Alert.log( "JspHelper.downloadContent(): mimeType = " + mimeType );
// Process as Requested.
try
response.setContentType( mimeType );
String filename = doc.getName();
String fileExtension = filename.substring( filename.lastIndexOf( '.' ) + 1 );
filename = filename.substring( 0, filename.lastIndexOf( '.' ) - 1 );
Selector mySelector = new Selector( getSession( request, response ) );
mySelector.setSearchClassname( Format.CLASS_NAME );
mySelector.setSearchSelection( Format.MIMETYPE_ATTRIBUTE + "='" + mimeType + "'" );
if( mySelector.getItemCount() > 0 )
Format f = ( Format ) mySelector.getItems( 0 );
fileExtension = f.getExtension();
filename = filename + '.' + fileExtension;
if( DEBUG )
Alert.log( "JspHelper.RenderContent(): Filename = " + filename );
if( download )
response.setHeader( "Content-Disposition", "attachment; filename=" + filename );
else
response.setHeader( "Content-Disposition", "inline; filename=" + filename );
InputStream is;
if( renderedOutput )
is = doc.renderAsStream( operation, policy, null );
else
is = doc.getContentStream();
response.setContentLength( ( int ) doc.getContentSize() );
OutputStream os = response.getOutputStream();
byte [] bytesRead = new byte [ 1024 ];
for( int byteCount = is.read( bytesRead, 0, bytesRead.length );
byteCount > 0;
byteCount = is.read( bytesRead, 0, bytesRead.length ) )
os.write( bytesRead, 0, byteCount );
catch( Exception e )
throw new IfsException( 9999, e );
* Please complete the missing tags for dumpInputStream
* @param
* @return
* @throws
* @pre
* @post
public static void dumpInputStream( ServletInputStream sis )
throws IOException
FileOutputStream fos;
if( File.separator.equals( "\\" ) )
fos = new FileOutputStream( "C:\\temp\\request.txt" );
else
fos = new FileOutputStream( "/tmp/request.txt" );
byte [] bytes = new byte [ 1024 ];
for( int bytesRead = sis.readLine( bytes, 0, bytes.length );
bytesRead > 0;
bytesRead = sis.read( bytes, 0, bytes.length ) )
Alert.log( "JspHelper.dumpInputStream() BytesRead = " + bytesRead );
fos.write( bytes, 0, bytesRead );
fos.close();
* Please complete the missing tags for getTimeOutURL
* @param
* @return
* @throws
* @pre
* @post
private static String getTimeOutURL()
Locale locale = Locale.getDefault();
String country = locale.getCountry();
String language = locale.getLanguage().toLowerCase();
String localizedFolder = language;
if( country != null )
if( ( ! language.equalsIgnoreCase( "en" ) ) &#0124; &#0124;
( ( language.equalsIgnoreCase( "en" ) ) && ( ! country.equalsIgnoreCase( "US" ) ) ) )
language = language + "_" + country.toUpperCase();
return IFSWEBROOT + "/" + language + IFSTIMEOUT_URL;
null

Similar Messages

  • Cant open doc files from the server on MacBook Air after upgrading to Maverick

    Cant open doc files from the server on MacBook Air after upgrading to Maverick, I can only open up docx file. Thank you!

    Thanks for the suggestion! I don't use Phantasm or VectorScribe (or any Astute Graphics plugins for that matter). I do, however, have a Wacom tablet and have a few plugins that concern using Blurb Book Creator as well as LiveSurface Context.
    I did the very unfortunate and foolish act of upgrading to Maverick without a backup, so postponing isn't an option for me.
    I geuss my question at this point would be, would it be worthwhile to wipe all the adobe products from my harddrive and re-install them? Or would that be a useless endeavor.
    I don't have an external hard-drive so backing up and re-installing the entire OS would be a bit much. Any suggestions?

  • Not opening .doc files from cd??

    Hi,
    I have various .doc files on cd. I want to use pages to open them. When i drag them from the cd onto either the pages icon or try the same using "file, open" from within pages i get an error message saying that it cannot open the file.
    If i drag the same .doc files onto the hard drive first i can open them in pages no problem.
    I need to be able to open them from the cd. Does anyone know what is wrong here or how it can be fixed?
    Many thanks.

    Hello
    My guess is that the device must be set as read/write to permit to expand the Index.xml.gz file which contains the doc's description.
    I just guess because I saw the Index.xml file during the save process but, even with huge documents I was unable to see the expansion process at work.
    I was also able to see the Index.xml file if I double click the Index.xml.gz icon.
    Yvan KOENIG (from FRANCE jeudi 21 février 2008 20:08:49)

  • Can not open .doc files from Finder

    I installed Snow Leopard and now I'm having trouble with .doc files. I use Microsoft Office 2004. When I try to open a .doc file directly from the internet or by clicking on it from Finder or desktop, it won't open. Instead I have to go into Word and click open then browse. Any ideas on how to fix this?

    This works only for files that I know have been created in Mac Office 2004, but any other files I download - for instance, from school - will not open in this way. I followed your suggestion, but Word was already the default application used and the "change all" box was unclickable.
    I tried right clicking on the file, going to the "open with" menu, then clicking "other" and selected Word that way. I made sure that "always open with" was checked, but it still didn't help.

  • Trial question:  Can't open .doc files from web page

    I'm using Dreamweaver on a Mac, and I have a link on a page
    that should bring up a doc file. When I preview the page in Safari,
    it brings up a directory listing which highlights the file so that
    you can double-click and open the file. (Of course, I'd love for it
    to go ahead and open the file, but my understanding is that
    Dreamweaver Mac doesn't support that.) However, when I preview in
    Internet Explorer, I either get a message that the File is Not
    Found or it just spins and never brings up anything. The file is in
    the root directory of my site (same directory as my index.html.
    Any ideas?
    Thanks!
    Kim

    Do you have Word installed on your Mac? If you don't, it
    won't open.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "kshorb" <[email protected]> wrote in
    message
    news:eenckl$h3a$[email protected]..
    >I used code similar to that below, but the .doc file
    never opened in IE. I
    >did
    > find, however, if I link to a .pdf it works just fine.
    So I just went
    > ahead
    > and converted my .doc to a .pdf and changed the href.
    Maybe it's
    > something
    > specific to my computer... Thanks.
    >
    > <a href="yourdoc.doc">Click here to open Word Doc
    > </a>
    >

  • Opening .doc files from Java

    Ok, here's my problem.
    I'm using Java to create an autorun program for a little thing I'm putting together.
    One of the options should be "Read documentation" . However, to do that, I need to make my program open a Microsoft Word (.doc) document. What is the command/how can I do this? By open, I mean open the file in MS Word for viewing.

    When you say "where filename is the path" do you mean
    type in "\documentation\file.doc" or is it a variable?It's a variable in the example. It doesn't matter -- just as long as the resulting string passed to exec will contain the correct file name so the OS will see it.

  • I cannot open any .doc files on Firefox from any source such as yahoo mail, blackboard, and UW Catalyst, while I have no problem opening .docx files from the same sites. When then happens, I have to switch to explorer and it's really annoying.

    Cannot open Microsoft Word .doc files from any website (.docx are ok)

    That is a legitimate Mozilla newsletter. As it says in the email:
    You're receiving this email because you subscribed to receive email newsletters and information from Mozilla. If you do not wish to receive these newsletters, please click the Unsubscribe link below.
    Unsubscribe https://www.mozilla.org/en-US/newsletter/existing/ad9febcf-65ac-41fd-810b-798945f448f3/
    Modify your preferences https://www.mozilla.org/en-US/newsletter/existing/ad9febcf-65ac-41fd-810b-798945f448f3/ "

  • Want to open specific file from DMS Doc. thorugh Function

    HI,
    is there any function module to open specific file from DMS Document. ?
    There is already one function module DOCUMENT_SHOW_DIRECT to open File from document. But
    in case of there are more than one file in DMS Document is it giving me Popup menu to open file from List.
    I just want to open any single file without any popup from DMS Document.

    Hi,
    from standard point of view this kind of pop-up is always raised by the function module in case there are multiple originals assigned to the document info record.
    Best regards,
    Christoph

  • How do I open pdf file from web? Opening pdf docs from hard drive works fine.

    Hello,
      I am unable to open pdf files from the web.  Documents on my hard drive open fine.  My computer gives me 2 error messages when I try to open web-based documents.  Thanks.

    Why did you post so many informations about operating system, web browser, Adobe Reader version, and the error messages?

  • Can't open INDD file from icon

    I have an installation of InDesign CS3 (upgraded from CS2) that won't let the user open a file from it's icon. You get the error message of "<filename> is not a valid win32 application"   The file will open if you open InDesign and use the file open menu.  The icon isn't the InDesign icon either-looks like a doc file icon without Word installed.  I've gone into File Types (from the Tools-Folder Options-File Type window) and tried to manually made the indd file open with CS3 but that still didn't work (oddly when I try to use the CS3 icon it too has a generic .exe icon).<br /><br />If I log in as myself (admin rights on the Windows XP) and once I did the above it worked for me.  I gave the user full rights and tried the above again but it didn't work-still wouldn't open by clicking on the icon-just keep getting that error message.  Any help would be great as I can't seem to come across anything googled that is helping.

    This is a follow-up.  My question has been answered in that  did get to open the file as follows:
    By trial and error (based on responses)  basically I was able to open the file as a copy from inside InDesign. There are three options in the lower left had corner of the window, I picked copy after trying the other two. Up until this time I could not find any idlk file.
    Once I opened the file I backed it up and made another copy that I opened.  I went back to the original file and tried to open it from finder. It would not open. Still no sign of the idlk file.  But when I went back to open the work copy it opened but now the idlk file popped up in the finder  and it continues to do so every time I open any file associated.    This idlk file comes up with an icon that says "Locked"
    My only question now: Is there a way to unlock this file from whatever it is linking to? Does it make any difference at this point?
    I have learned this is a temp file of sorts that prevents changes to the original file. I would like to unlock the file so that it not connected to anything.
    I have moved or deleted all files that it might be linking to.  I have shut down other computers and hard drives using the same network. The idlk file come up every time. It goes away when I close the file.  I have also deleted it while the file is open. I deleted all attempts at creating Book files. I'v been through preferences and checked Assignments. It seems like once you make a copy of a file, the original is always looking for the copy? Or the copy for the original?
    So I'm working and making separate files for each chapter so that I can set up a book and have back-up and maybe create a whole new Book file that isn't linked to anything else but maybe that's not necessary.
    I've been working with InDesign for a long time and never encountered this phenomenon before.
    Thanks again for your responses.
    Jim

  • I am unable to accept a .doc file from a sender

    FILE TRANSFER ERROR:
    Could not receive file “FAIR v. Rumsfeld.doc” from Tiggsfrnpooh26:
    An error occurred.
    This is what comes up when i try to recieve it.
    I have had no trouble with sending and recieving files in the past, though this is the first time I have tried to recieve a .doc file from someone. And that someone is using a PC.
    Others I ahve recieved and sent files to with no problem were on macs, but i dont think that is the issue here.
    I do have port 5190 open as usual.
    Am i Missing something,
    any questions will be answered right away.

    Hi
    The " v. " was the thing causing the problem.
    12:23 PM Wednesday; March 29, 2006

  • How do I make Pages my default program for opening doc files

    Currently TextEdit is the default program to open doc files that I download from emails. Now that I've installed iWork 08 I would like Pages to be the default program. Thanks!

    Right-click any .DOC file and select Get Info. Then choose Pages as the open with application and select "Change For All. Pages is now your default app for .DOCs.

  • Opening .doc files with wrong program

    Hi *,
    first I've installed open office. A few month later I installed micorsoft office. After that I converted all office files. Everything was working fine. Now my mac forgot to open .doc files with ms word, he chooses oo word. I do'nt have these problems with .xls files.
    Where are the global settings that I can tell my mac to open .doc files with ms word (I will not use "open with" each time;-)
    Thanks in advance
    Michael
    Message was edited by: MichaelLudt

    Select the file. Do a "Get-Info" from the File menu. (command-I). In the drop down menu "open with" select the program and then confirm you want all files like these to open with that program.

  • How to open a file from thumbdrive by Java!

    Can anyone reply me the Java sample code to open a file from thumbdrive. Currently I can only open files from my "C"Drive. The Drive which I will be using for my thumbdrive is F Drive.
    Thank you!

    Currently I need to make changes to this code so that it can read the "my file" from my f drive instead of the c drive.
    /public class Main {
    public Main() {
    public static void main(String[] args) {
    try {
    //Runtime.getRuntime().exec("cmd /c start myfile.doc");
    //Runtime.getRuntime().exec("cmd /c start \"myfile.doc\"");
    Runtime.getRuntime().exec("cmd /c start myfile.pps");
    //Runtime.getRuntime().exec("cmd /c start myfile.xls");
    //Runtime.getRuntime().exec("cmd /c start myfile.pdf");
    //Runtime.getRuntime().exec("myfile.doc");
    catch (Exception x) {
    x.printStackTrace();
    catch (Error e) {
    e.printStackTrace();
    }

  • Opening .doc files in pages

    Someone has sent me a .doc word file and when i right click 'open in pages' a window is displayed reading 'the file format is invalid'. It's strange because this has never happened before and we haven't done anything different to what we normally do regarding opening .doc files etc.
    It doesn't open in text edit either. Does anyone have any work around? Free word software anywhere on the internet?
    Really need some help with this, hours of work has gone into this file we can't open!! And now it might be lost!
    Cheers,
    Jamie McIntyre

    moviemaniac2 wrote:
    Really need some help with this, hours of work has gone into this file we can't open!! And now it might be lost!
    The simple soluce would be to ask the author for a document using a format which you will be able to read.
    A message which I like to send is: +"Your xyz.doc document is not recognized as a standard format on my machine so it was deliberately deleted. If you wish that I read it's contents, use an other format. Don't try with PowerPoint, it would be trashed too."+
    Is it too complicated?
    My guess is that the document uses the most recent .doc format. If I'm right, as thisformat was not defined when Pages 3 was built, the described behavior is not surprising.
    I don't know the details of this file format.
    You may send it to my mailbox, I will be glad to look at its internals. (the readable contents is not what I'm interested to.
    Click my blue name to get my mailbox address.
    Yvan KOENIG (from FRANCE jeudi 19 juin 2008 16:37:53)

Maybe you are looking for

  • Image and some date is not displaying in firefox 3.6 but printing on the printouts

    Hi, Am using "170 systems" a third party tool .from this tool,I have to develope Document Type : Organization Name : Priority : then i have to submit then a barcode have to be generated with the above details but the details are not showing on the pr

  • Different granularity fact tables (NOT aggregated tables)

    Hi! Imagine the following Physical Layer: - Dimension Table "Year" (one-to-many FK relationship with "Month") - Dimension Table "Month" (one-to-many FK relationship with "Day" and "Sales_Month") - Dimension Table "Day" (one-to-many FK relationship wi

  • Online store

    Hello I've seen samples on how to build an online, but none them go in depth in how to connect a store to a merchant and handling payment transactions. Can anyone suggest a tutorial or examples of using Flex with payment transactions?

  • Backups in Multiple Folders

    When I go into my Time Machine Backups drive I see two folders of backups, my iMac and iMac2. When I go into the actual Time Machine program I can only access the backups in my iMac folder, not any which are in the iMac2 folder. I'm not able to move

  • HELP! AI CC 2014.1 crashes on opening - Windows 7

    I was in the middle of a job, deadline tomorrow, and foolishly I though no harm would come by following CC's advice and updating AI to the latest version. How wrong could I be?!! I switched off Suitcase Fusion plugin in case that had something to do