Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Mon, 4 Aug 2008 08:52:05 -0700,    group: microsoft.public.word.word6-7macros        back       


Error Copying Macro Text from One Computer to Another   
I created several macros in Word 2007 (PC) that run perfectly and do exactly 
what I expected them to do.  Because my boss wants the same macros (we are 
not on a network), I copied the macro text in VB, pasted into a Word document 
and emailed it to my boss.  I then went to her computer, opened the document, 
copied the text and then pasted into VB on her computer.  One of the macros 
runs great, however, the other two (which had text boxes inserted during the 
recording) give me the error "Object Variable or with Block Variable not 
set".  Is anyone familiar with this scenario?  What can I do to fix the macro 
on my boss' computer so that it runs correctly?  Also, I am not very 
technically inclined so please do not not get too technical with your 
response.  Thanks,  
-- 
Molly
date: Mon, 4 Aug 2008 08:52:05 -0700   author:   Molly

Re: Error Copying Macro Text from One Computer to Another   
I assume that you have the macros in your Normal.dotm template.  The problem 
is probably caused by a line break being inserted into the code as a result 
of the process that you have used.  If on your bosses machine, you open the 
Visual Basic Editor and from the Debug menu item, select Compile 
[templatename], it should highlight the line of code that is causing the 
error.

A better way to do this process would be to select the module in your Visual 
Basic Editor, then from the File menu in the VBE, select Export File.  A 
dialog box will open showing the folder to which the module will be 
exported.  Then after doing that, put a copy of that file on your bosses 
computer and in the VBE, from the File menu, select Import File and then 
browse to and select the file.

Alternatively, see the article "Distributing macros to other users" at:

http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm


-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Molly"  wrote in message 
news:F51A42BC-62BA-4861-B232-C82ABCD5B633@microsoft.com...
>I created several macros in Word 2007 (PC) that run perfectly and do 
>exactly
> what I expected them to do.  Because my boss wants the same macros (we are
> not on a network), I copied the macro text in VB, pasted into a Word 
> document
> and emailed it to my boss.  I then went to her computer, opened the 
> document,
> copied the text and then pasted into VB on her computer.  One of the 
> macros
> runs great, however, the other two (which had text boxes inserted during 
> the
> recording) give me the error "Object Variable or with Block Variable not
> set".  Is anyone familiar with this scenario?  What can I do to fix the 
> macro
> on my boss' computer so that it runs correctly?  Also, I am not very
> technically inclined so please do not not get too technical with your
> response.  Thanks,
> -- 
> Molly
date: Tue, 5 Aug 2008 05:34:01 +1000   author:   Doug Robbins - Word MVP

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us