Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Linking to a word document

Featured Replies

Hi all

we've got a spot of bother at our company, in that we're all being made redundant. To that end, I'm making a template webpage for the guys so they can put their stuff up on the net - thus making life a lot easier for them while looking for work. Can anyone tell me how to link to a word document - i've tried an href but it doesn't seem to want to open the file i.e:

 

<a href ="cv.doc">CV</a>

 

I'd make an html page for them to edit, but I need to keep it simple for them so ideally all I want them to have to do is bung their CV in a given folder on their server so it get's opened in IE or downloaded.

Hi all

we've got a spot of bother at our company, in that we're all being made redundant. To that end, I'm making a template webpage for the guys so they can put their stuff up on the net - thus making life a lot easier for them while looking for work. Can anyone tell me how to link to a word document - i've tried an href but it doesn't seem to want to open the file i.e:

 

<a href ="cv.doc">CV</a>

 

I'd make an html page for them to edit, but I need to keep it simple for them so ideally all I want them to have to do is bung their CV in a given folder on their server so it get's opened in IE or downloaded.

 

 

Maybe put the word document to an pdf

 

It works for me

 

That's how you do it

just a thought - will it work if you remove the space between href and =?

<a href="cv.doc">CV</a>

Yeah that should definately work without the spaces, as long as the word doc is in the same directory as the html file of course!

Well if you mean opening the document in Word instead of an in-browser page, you will need to create a backend script for IE. Otherwise it would open in all browsers (such as Firefox and Sefari) with a regular

<a href="name_here.doc">NAME</a>

.

 

I believe to force a file download you will need to send headers before the file is sent out. You will definitely need to use a technique form PHP, taken from

http://www.php.net/manual/en/function.header.php

 

<?php
// We'll be outputting a PDF
header('Content-type: application/msword'); //or application/vnd.ms-excel

// It will be called downloaded.doc
header('Content-Disposition: attachment; filename="downloaded.doc"');

// The PDF source is in original.doc
readfile('original.doc');
?>

 

this will allow the file to be opened as an option.

Well if you mean opening the document in Word instead of an in-browser page, you will need to create a backend script for IE.

 

No you don't, All you need to do is provide a link to the file on the server using the <a> tag and the browser will automatically detect it and allow it to be downloaded and either saved or opened!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.