Macro Works One Machine Not Another 
Author Message
 Macro Works One Machine Not Another

I created a macro on my machine that would modify the
Viewing and Printing options from the Tools | Options
menu. The objective is to view or not view hidden text, as
well as print or not print.

I saved the Macro to the current document and then emailed
the word file to two separate colleagues. When they
attempted to execute the macro, it failed and went to the
debug editor. I tried a few different methods of creating
the macro but it continues to fail on other machines, and
works fine on mine.

Is there something in the security settings that prevents
a macro that changes word options from running on another
machine, other than the one that created it?

Additionally, is there a work-around macro that can change
options on user's computer that opens a word doc to change
from viewing and printing hidden text?

Thanx,
any and all help is appreciated

Jesse



Wed, 30 Nov 2005 00:35:10 GMT  
 Macro Works One Machine Not Another
The error message is: "invalid outside procedure"
Quote:
>-----Original Message-----
>I created a macro on my machine that would modify the
>Viewing and Printing options from the Tools | Options
>menu. The objective is to view or not view hidden text,
as
>well as print or not print.

>I saved the Macro to the current document and then
emailed
>the word file to two separate colleagues. When they
>attempted to execute the macro, it failed and went to the
>debug editor. I tried a few different methods of creating
>the macro but it continues to fail on other machines, and
>works fine on mine.

>Is there something in the security settings that prevents
>a macro that changes word options from running on another
>machine, other than the one that created it?

>Additionally, is there a work-around macro that can
change
>options on user's computer that opens a word doc to
change
>from viewing and printing hidden text?

>Thanx,
>any and all help is appreciated

>Jesse
>.



Wed, 30 Nov 2005 00:59:27 GMT  
 Macro Works One Machine Not Another
Saved the macro to the current document? Generally it would be saved to a
template. Are you sure you saved it in the document?

Does your macro rely on any references that are not available to your users?

BTW, your macro should be more complex than it is. You should be getting the
users settings for viewing / printing hidden text and restoring those
settings when you close your document. These are global settings - not
document specific.

--
Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://www.addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://www.addbalance.com/usersguide/index.htm>

Word Resources Page
<URL: http://www.addbalance.com/word/wordwebresources.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Quote:
> I created a macro on my machine that would modify the
> Viewing and Printing options from the Tools | Options
> menu. The objective is to view or not view hidden text, as
> well as print or not print.

> I saved the Macro to the current document and then emailed
> the word file to two separate colleagues. When they
> attempted to execute the macro, it failed and went to the
> debug editor. I tried a few different methods of creating
> the macro but it continues to fail on other machines, and
> works fine on mine.

> Is there something in the security settings that prevents
> a macro that changes word options from running on another
> machine, other than the one that created it?

> Additionally, is there a work-around macro that can change
> options on user's computer that opens a word doc to change
> from viewing and printing hidden text?

> Thanx,
> any and all help is appreciated

> Jesse



Wed, 30 Nov 2005 02:40:44 GMT  
 Macro Works One Machine Not Another
I did save the macros to the current document.

The purpose of the macro it to provide two buttons on the
toolbar that one can click, which will change Word's
options from displaying and printing hidden text, to not
displaying or printing it.

Thanks

Quote:
>-----Original Message-----
>Saved the macro to the current document? Generally it
would be saved to a
>template. Are you sure you saved it in the document?

>Does your macro rely on any references that are not

available to your users?
Quote:

>BTW, your macro should be more complex than it is. You

should be getting the
Quote:
>users settings for viewing / printing hidden text and
restoring those
>settings when you close your document. These are global
settings - not
>document specific.

>--
>Charles Kenyon

>Word New User FAQ & Web Directory:
><URL: http://www.addbalance.com/word/index.htm>

>Intermediate User's Guide to Microsoft Word (supplemented
version of
>Microsoft's Legal Users' Guide)
><URL: http://www.addbalance.com/usersguide/index.htm>

>Word Resources Page
><URL: http://www.addbalance.com/word/wordwebresources.htm>

>See also the MVP FAQ: <URL: http://www.mvps.org/word/>
which is awesome!
> --------- --------- --------- --------- --------- -------
--
>This message is posted to a newsgroup. Please post replies
>and questions to the newsgroup so that others can learn
>from my ignorance and your wisdom.



>> I created a macro on my machine that would modify the
>> Viewing and Printing options from the Tools | Options
>> menu. The objective is to view or not view hidden text,
as
>> well as print or not print.

>> I saved the Macro to the current document and then
emailed
>> the word file to two separate colleagues. When they
>> attempted to execute the macro, it failed and went to
the
>> debug editor. I tried a few different methods of
creating
>> the macro but it continues to fail on other machines,
and
>> works fine on mine.

>> Is there something in the security settings that
prevents
>> a macro that changes word options from running on
another
>> machine, other than the one that created it?

>> Additionally, is there a work-around macro that can
change
>> options on user's computer that opens a word doc to
change
>> from viewing and printing hidden text?

>> Thanx,
>> any and all help is appreciated

>> Jesse

>.



Wed, 30 Nov 2005 03:06:59 GMT  
 Macro Works One Machine Not Another
Hi Jesse,

What version of Word is on the 3 machines? Can you post
the macro code?

Tony

Quote:
>-----Original Message-----
>The error message is: "invalid outside procedure"
>>-----Original Message-----
>>I created a macro on my machine that would modify the
>>Viewing and Printing options from the Tools | Options
>>menu. The objective is to view or not view hidden text,
>as
>>well as print or not print.

>>I saved the Macro to the current document and then
>emailed
>>the word file to two separate colleagues. When they
>>attempted to execute the macro, it failed and went to
the
>>debug editor. I tried a few different methods of
creating
>>the macro but it continues to fail on other machines,
and
>>works fine on mine.

>>Is there something in the security settings that
prevents
>>a macro that changes word options from running on
another
>>machine, other than the one that created it?

>>Additionally, is there a work-around macro that can
>change
>>options on user's computer that opens a word doc to
>change
>>from viewing and printing hidden text?

>>Thanx,
>>any and all help is appreciated

>>Jesse
>>.

>.



Wed, 30 Nov 2005 05:48:15 GMT  
 Macro Works One Machine Not Another
Tony, attached is the code for one of the macros. The
purpose is to have one macro set attrtibutes to view and
print hidden text, and the other to not view and print
hidden text. The macros work with Word 2000, but fail with
Word 97. Any thoughts?

Application.DisplayStatusBar = True
    With ActiveWindow
        .DisplayHorizontalScrollBar = True
        .DisplayVerticalScrollBar = True
        .DisplayLeftScrollBar = False
        .StyleAreaWidth = InchesToPoints(0)
        .DisplayVerticalRuler = True
        .DisplayRightRuler = False
        .DisplayScreenTips = True
        With .View
            .ShowAnimation = True
            .Draft = False
            .WrapToWindow = False
            .ShowPicturePlaceHolders = False
            .ShowFieldCodes = False
            .ShowBookmarks = False
            .FieldShading = wdFieldShadingAlways
            .ShowTabs = False
            .ShowSpaces = False
            .ShowParagraphs = False
            .ShowHyphens = False
            .ShowHiddenText = True
            .ShowAll = False
            .ShowDrawings = True
            .ShowObjectAnchors = False
            .ShowTextBoundaries = False
            .ShowHighlight = True
        End With
    End With
    With Options
        .UpdateFieldsAtPrint = True
        .UpdateLinksAtPrint = True
        .DefaultTray = "Use printer settings"
        .PrintBackground = True
        .PrintProperties = False
        .PrintFieldCodes = False
        .PrintComments = False
        .PrintHiddenText = True
        .PrintDrawingObjects = True
        .PrintDraft = False
        .PrintReverse = False
        .MapPaperSize = True
    End With
    With ActiveDocument
        .PrintpostscriptOverText = False
        .PrintFormsData = False
    End With
End Sub

Quote:
>-----Original Message-----
>Hi Jesse,

>What version of Word is on the 3 machines? Can you post
>the macro code?

>Tony
>>-----Original Message-----
>>The error message is: "invalid outside procedure"
>>>-----Original Message-----
>>>I created a macro on my machine that would modify the
>>>Viewing and Printing options from the Tools | Options
>>>menu. The objective is to view or not view hidden text,
>>as
>>>well as print or not print.

>>>I saved the Macro to the current document and then
>>emailed
>>>the word file to two separate colleagues. When they
>>>attempted to execute the macro, it failed and went to
>the
>>>debug editor. I tried a few different methods of
>creating
>>>the macro but it continues to fail on other machines,
>and
>>>works fine on mine.

>>>Is there something in the security settings that
>prevents
>>>a macro that changes word options from running on
>another
>>>machine, other than the one that created it?

>>>Additionally, is there a work-around macro that can
>>change
>>>options on user's computer that opens a word doc to
>>change
>>>from viewing and printing hidden text?

>>>Thanx,
>>>any and all help is appreciated

>>>Jesse
>>>.

>>.

>.



Sat, 10 Dec 2005 00:05:36 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. transfering VBA macros to other machines is not working

2. Vb6 and Word working fine on one machine but not on other

3. Vb6 and Word working fine on one machine but not on other

4. Error 3071...Why on one machine and not on others

5. V7 Access code runs on one machine and not another

6. Progam runs on one machine, not on another

7. Excel file opened in IE3 - on one machine starts Excel, others does not

8. Simple Date SQL Errors on One Machine but not all the rest

9. Excel Macro only works within one project.

10. TSISoon still not working on XP - other machines...

11. Eval() Works In 1 mdb (same machine) but not 2nd mdb

12. MDE version of ACC97 database not working on other machines

 

 
Powered by phpBB® Forum Software