Reply
 
Thread Tools Display Modes
  #1   Report Post  
0013
 
Posts: n/a
Default Extra space when pasting link from excel to word as unformatted te

I'm having a problem with pasting links from excel to a word document. I'm
using Office 2003

I have a budget in Excel and I'm putting together an executive summary in
word. I want to link all of the numbers in word to the excel workbook.

For example, I want to write:
"Expenses in the Americas are xx%."
where the "xx" is a number linked from excel.

I copy the cell that has the number in excel, go to word and choose paste
special. I then select the paste as link option and choose unformatted text
from the list box.

This works fine except that in addition to the number, additional spaces are
also inserted. I can delete these, but they come back when I update the
link. So the sentence ends up looking like:
"Expenses in the Americas are xx%."

How do I get a link to just the number and not the extra spaces?

Thanks in advance for any help.
  #2   Report Post  
Jezebel
 
Posts: n/a
Default

Press Alt-F9 to display field codes. Your link field should look something
like this:

{ LINK Excel.Sheet.8 "C:\\My Documents\\Temp\\Book1.xls" MyCell \t }

Where MyCell is the name of the cell you want (assuming you've named it --
otherwise use SheetName!CellRef). The \t switch says you want plain text,
not an image of the cell containing the value, which seems to be what you're
getting at the moment.




"0013" wrote in message
...
I'm having a problem with pasting links from excel to a word document.

I'm
using Office 2003

I have a budget in Excel and I'm putting together an executive summary in
word. I want to link all of the numbers in word to the excel workbook.

For example, I want to write:
"Expenses in the Americas are xx%."
where the "xx" is a number linked from excel.

I copy the cell that has the number in excel, go to word and choose paste
special. I then select the paste as link option and choose unformatted

text
from the list box.

This works fine except that in addition to the number, additional spaces

are
also inserted. I can delete these, but they come back when I update the
link. So the sentence ends up looking like:
"Expenses in the Americas are xx%."

How do I get a link to just the number and not the extra spaces?

Thanks in advance for any help.



  #3   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?MDAxMw==?=,

This works fine except that in addition to the number, additional spaces are
also inserted. I can delete these, but they come back when I update the
link. So the sentence ends up looking like:
"Expenses in the Americas are xx%."

How do I get a link to just the number and not the extra spaces?

Are you absolutely sure these spaces aren't part of the cell entry in Excel?
I've never seen anything like you describe before, if a cell doesn't contain
spaces.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #4   Report Post  
Jezebel
 
Posts: n/a
Default



Are you absolutely sure these spaces aren't part of the cell entry in

Excel?
I've never seen anything like you describe before, if a cell doesn't

contain
spaces.


Cindy, if you paste a link to a single cell, without doing anything else,
you get the entire cell itself -- the 'extra spaces' represent the width of
the cell. It becomes obvious what's happening if the cell has borders around
it in Excel.


  #5   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi Jezebel,

if you paste a link to a single cell, without doing anything else,
you get the entire cell itself

But not if you choose to paste as unformatted (plain) text. I just
did a quick test - to make sure my memory isn't playing tricks on me
:-) - and I definitely do not see any spaces when I paste as plain
text.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)



  #6   Report Post  
0013
 
Posts: n/a
Default

No, I'm definitly getting it as text. Here is the field code

{ LINK Excel.Sheet.8 "\\\\ibnbs003\\piaprojections\\2005 Budget\\Budget
Book\\2005 Excel Budget Book.xls" "Inv by Region & BU!R9C3" \a \t }

"Jezebel" wrote:

Press Alt-F9 to display field codes. Your link field should look something
like this:

{ LINK Excel.Sheet.8 "C:\\My Documents\\Temp\\Book1.xls" MyCell \t }

Where MyCell is the name of the cell you want (assuming you've named it --
otherwise use SheetName!CellRef). The \t switch says you want plain text,
not an image of the cell containing the value, which seems to be what you're
getting at the moment.




"0013" wrote in message
...
I'm having a problem with pasting links from excel to a word document.

I'm
using Office 2003

I have a budget in Excel and I'm putting together an executive summary in
word. I want to link all of the numbers in word to the excel workbook.

For example, I want to write:
"Expenses in the Americas are xx%."
where the "xx" is a number linked from excel.

I copy the cell that has the number in excel, go to word and choose paste
special. I then select the paste as link option and choose unformatted

text
from the list box.

This works fine except that in addition to the number, additional spaces

are
also inserted. I can delete these, but they come back when I update the
link. So the sentence ends up looking like:
"Expenses in the Americas are xx%."

How do I get a link to just the number and not the extra spaces?

Thanks in advance for any help.




  #7   Report Post  
0013
 
Posts: n/a
Default

The cell contains the following formula
=ROUND(SUMPRODUCT(--(BInv_BU_rng=$B9),--(BInv_Region_rng=C$6),BInv_Amount_rng)/1000000,0)

I think it has to do with the number formatting. The numbers are currently
using a custom format of
_($_(?,??0_);_($_(??(#,##0);_($_(_?_,_?_? "-"_);_(@_)
or
_(_$_(?,??0_);_(_$_(??(#,##0);_(_$_(_?_,_?_? "-"_);_(@_)
to make sure that the first line and the total line have aligned dollar
signs and that all of the intermediate lines are aligned.

When I switch the format to "General" I don't get the spaces.

Is there a way to keep my number formatting and not get the extra spaces?



"Cindy M -WordMVP-" wrote:

Hi Jezebel,

if you paste a link to a single cell, without doing anything else,
you get the entire cell itself

But not if you choose to paste as unformatted (plain) text. I just
did a quick test - to make sure my memory isn't playing tricks on me
:-) - and I definitely do not see any spaces when I paste as plain
text.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)


  #8   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

I don't know whether it's a problem with the LINK field or not, but it's
certainly the case that EQ fields have this problem: the default space at
the end of the field code is carried over into the document; it is necessary
to remove the space to get the desired result. You might see what happens if
you use the field below as follows:

{ LINK Excel.Sheet.8 "\\\\ibnbs003\\piaprojections\\2005 Budget\\Budget
Book\\2005 Excel Budget Book.xls" "Inv by Region & BU!R9C3" \a \t}


--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"0013" wrote in message
...
No, I'm definitly getting it as text. Here is the field code

{ LINK Excel.Sheet.8 "\\\\ibnbs003\\piaprojections\\2005 Budget\\Budget
Book\\2005 Excel Budget Book.xls" "Inv by Region & BU!R9C3" \a \t }

"Jezebel" wrote:

Press Alt-F9 to display field codes. Your link field should look

something
like this:

{ LINK Excel.Sheet.8 "C:\\My Documents\\Temp\\Book1.xls" MyCell \t }

Where MyCell is the name of the cell you want (assuming you've named

it --
otherwise use SheetName!CellRef). The \t switch says you want plain

text,
not an image of the cell containing the value, which seems to be what

you're
getting at the moment.




"0013" wrote in message
...
I'm having a problem with pasting links from excel to a word document.

I'm
using Office 2003

I have a budget in Excel and I'm putting together an executive summary

in
word. I want to link all of the numbers in word to the excel

workbook.

For example, I want to write:
"Expenses in the Americas are xx%."
where the "xx" is a number linked from excel.

I copy the cell that has the number in excel, go to word and choose

paste
special. I then select the paste as link option and choose

unformatted
text
from the list box.

This works fine except that in addition to the number, additional

spaces
are
also inserted. I can delete these, but they come back when I update

the
link. So the sentence ends up looking like:
"Expenses in the Americas are xx%."

How do I get a link to just the number and not the extra spaces?

Thanks in advance for any help.





  #9   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?MDAxMw==?=,

The cell contains the following formula
=ROUND(SUMPRODUCT(--(BInv_BU_rng=$B9),--(BInv_Region_rng=C$6),BInv_Amount_rng)/1000000,0)

I think it has to do with the number formatting. The numbers are currently
using a custom format of
_($_(?,??0_);_($_(??(#,##0);_($_(_?_,_?_? "-"_);_(@_)
or
_(_$_(?,??0_);_(_$_(??(#,##0);_(_$_(_?_,_?_? "-"_);_(@_)
to make sure that the first line and the total line have aligned dollar
signs and that all of the intermediate lines are aligned.

Yes, this is probably the reason for the spaces.

It looks like you can use a number switch within the Link field. After \t make sure theres
a space, then enter: \# 0

When I switch the format to "General" I don't get the spaces.

Is there a way to keep my number formatting and not get the extra spaces?


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the
newsgroup and not by e-mail :-)

  #10   Report Post  
0013
 
Posts: n/a
Default

That works great. Thank you so much!

The only other question I have would be if you know what arguments to pass
the switch so that a decimal shows up as a percent i.e. ".57" shows up as 57%

"Cindy M -WordMVP-" wrote:

Hi ?B?MDAxMw==?=,

The cell contains the following formula
=ROUND(SUMPRODUCT(--(BInv_BU_rng=$B9),--(BInv_Region_rng=C$6),BInv_Amount_rng)/1000000,0)

I think it has to do with the number formatting. The numbers are currently
using a custom format of
_($_(?,??0_);_($_(??(#,##0);_($_(_?_,_?_? "-"_);_(@_)
or
_(_$_(?,??0_);_(_$_(??(#,##0);_(_$_(_?_,_?_? "-"_);_(@_)
to make sure that the first line and the total line have aligned dollar
signs and that all of the intermediate lines are aligned.

Yes, this is probably the reason for the spaces.

It looks like you can use a number switch within the Link field. After \t make sure theres
a space, then enter: \# 0

When I switch the format to "General" I don't get the spaces.

Is there a way to keep my number formatting and not get the extra spaces?


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the
newsgroup and not by e-mail :-)




  #11   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?MDAxMw==?=,

The only other question I have would be if you know what arguments to pass
the switch so that a decimal shows up as a percent i.e. ".57" shows up as 57%

For Word, in order to do this you need to do some calculation. For example

{ = { LINK Excel.Sheet.8 "Book1" "Sheet1!R1C1" \a \t }*100 \# 0 }

Select the LINK field, then press Ctrl+F9 to put a set of field brackets around
it. Then enter the parts of the calculation.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #12   Report Post  
0013
 
Posts: n/a
Default

Works perfectly. Thank you so much.

"Cindy M -WordMVP-" wrote:

Hi ?B?MDAxMw==?=,

The only other question I have would be if you know what arguments to pass
the switch so that a decimal shows up as a percent i.e. ".57" shows up as 57%

For Word, in order to do this you need to do some calculation. For example

{ = { LINK Excel.Sheet.8 "Book1" "Sheet1!R1C1" \a \t }*100 \# 0 }

Select the LINK field, then press Ctrl+F9 to put a set of field brackets around
it. Then enter the parts of the calculation.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
In typing dates in Word, i.e. "January 12" how do you keep the "1. Carol Microsoft Word Help 2 January 12th 05 08:09 PM
word xp crashes after macros are recorded kharris0405 Microsoft Word Help 3 January 11th 05 10:50 PM
WP Delay Code - Word Equiv Mike G - Milw, WI Microsoft Word Help 6 January 10th 05 04:12 PM
How to change merge forms from Word Perfect to Microsoft Word dollfindance Microsoft Word Help 2 December 30th 04 03:35 PM
formatting links from excel into word (extra line feeds) JGT Microsoft Word Help 1 December 9th 04 11:01 AM


All times are GMT +1. The time now is 04:38 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"