[austechwriter] Re: Linking and unlinking files in Word 2000

  • From: "Steve Hudson" <cruddy@xxxxxxxxxxxxxxxx>
  • To: <austechwriter@xxxxxxxxxxxxx>
  • Date: Fri, 9 May 2003 15:17:03 +1000

Hokay. Bloody working lunches, all I wanted was a beer and a chat :-(
Anyway...

I apologise in advance if you happen to learn some VBA on the way, it's an
unfortunate side-effect of talking with me sometimes. Replace that single
line I gave you before with something like this


'Steve Hudson, the Word Heretic
Dim Paddock As Field

For Each Paddock In ActiveDocument.Content.Fields
   Select Case Paddock.Type ' nicer way to do multi-ifs
      Case wdFieldTOC, wdFieldIndex
: 'do nuttin
      Case Else
         Paddock.Unlink 'fix it in place
   End Select

Set Paddock = Nothing
End Sub


Note you can easily extend what isnt included by adding more fields to the
first Case statement. If you have autocomplete enabled (default), append a
comma and wdfield and then press ctrl+spacebar to see what other fields you
could ignore if neccesary.

If people REALLY needed a VBA programmer, I would have more work lol. This
stuff is simple once you learn how. Enjoy.


Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email:      word_heretic@xxxxxxxxxxxx
Products:   http://www.geocities.com/word_heretic/products.html
Spellbooks: 735 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.


-----Original Message-----
From: austechwriter-bounce@xxxxxxxxxxxxx
[mailto:austechwriter-bounce@xxxxxxxxxxxxx]On Behalf Of KENT Christine
Sent: Friday, 9 May 2003 12:09 PM
To: austechwriter@xxxxxxxxxxxxx
Subject: [austechwriter] Re: Linking and unlinking files in Word 2000



Fabulous Steve, works a treat...

...except that it also kills the TOC.  Is there any way of differntiating b=
etween TOCs and Links?

Christine


-----Original Message-----
From: Steve Hudson [mailto:cruddy@xxxxxxxxxxxxxxxx]
Sent: Friday, 9 May 2003 10:04
To: austechwriter@xxxxxxxxxxxxx
Subject: [austechwriter] Re: Linking and unlinking files in Word 2000



You do have access to a VBA programmer; Hi! How ya doing? :-)

A simple bit of VBA can help you. I'm going to help you stick a subroutine
in where it's needed, in the templates for the Read Only Dox (RODs) or in
the RODs themselves.

Here's a walk through for you:

1. If doing the template OPEN the template via a right-click from explorer.
Do not use the default action of NEW. If doing the documents, just open the
documents normally.

2. Alt+F11 to go into spooky VBA land.

3. On the left hand side you will have the project explorer. Locate the
project associated with your document. Expand it if neccesary to see the
Microsoft Word Objects > ThisDocument object.

4. Select the ThisDocument object. Your right hand pane will be empty, but
above it will be several dropdowns.

5. Set the left hand dropdown to Document and the right-hand dropdown to
Open. If you want to create "flat" documents from a template with linked
text, don't select Open, select New instead.

6. You now have the start of a few empty code segments. Stick you cursor in
the blank line inside the relevant one and enter this one line:

Me.Content.Fields.Unlink

7. You is done! Save, test and enjoy.


Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email:      word_heretic@xxxxxxxxxxxx
Products:   http://www.geocities.com/word_heretic/products.html
Spellbooks: 735 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.


-----Original Message-----
From: KENT Christine

Hi Guys

I wonder if anyone else has solved this problem and how they did it.

We are using Word 2000 only and this is non-negotiable.  I have a number of=
=3D
 documents that each use a subset of a range of re-usable modules.  I also =
=3D
have a user group for these documents that struggles with styles let alone =
=3D
anything more complex. =3D20

I have linked these re-usable modules into each read only document using In=
=3D
cludeText, so that they open automatically when the document opens.  From t=
=3D
his point they need to be unlinked so that the user can modify the content,=
=3D
 but I have not worked out how to unlink them automatically. (These users c=
=3D
annot be asked to use Ctrl Shift F9 to unlink the linked files, nor can the=
=3D
y be asked to change any of their user options.)

IncludeText does not seem to have any switches available to unlink the file=
=3D
 once it has been included. =3D20

How do I do this - without access to a VB programmer?

**************************************************
To post a message to austechwriter, send the message to austechwriter@freel=
ists.org.

To subscribe to austechwriter, send a message to austechwriter-request@free=
lists.org with "subscribe" in the Subject field.

To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with =
"unsubscribe" in the Subject field.

To search the austechwriter archives, go to www.freelist.org/archives/auste=
chwriter

To contact the list administrator, send a message to austechwriter-admins@f=
reelists.org
**************************************************


***************************************************************************=
******
This e-mail and its contents is confidential to Gold Coast City Council
and un-authorised use is strictly prohibited.=20
***************************************************************************=
******

**************************************************
To post a message to austechwriter, send the message to
austechwriter@xxxxxxxxxxxxxx

To subscribe to austechwriter, send a message to
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.

To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with
"unsubscribe" in the Subject field.

To search the austechwriter archives, go to
www.freelist.org/archives/austechwriter

To contact the list administrator, send a message to
austechwriter-admins@xxxxxxxxxxxxx
**************************************************

**************************************************
To post a message to austechwriter, send the message to 
austechwriter@xxxxxxxxxxxxxx

To subscribe to austechwriter, send a message to 
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.

To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with 
"unsubscribe" in the Subject field.

To search the austechwriter archives, go to 
www.freelist.org/archives/austechwriter

To contact the list administrator, send a message to 
austechwriter-admins@xxxxxxxxxxxxx
**************************************************

Other related posts: