Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

VBA Error after installing Microsoft Accounting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Berlie - 24 Oct 2007 19:18 GMT
Before installing Microsoft Accounting 2007 the following VBA code in
Word 2007 under Vista worked fine. After installing it gives a Command
Not
Available error on the .LinkToPrevious = False line.

Sub UnLink()
Dim oSect As Section
Dim i As Long
For Each oSect In ActiveDocument.Range.Sections
 For i = 1 To 3
     oSect.Footers(i).LinkToPrevious = False
     oSect.Headers(i).LinkToPrevious = False
 Next
Next oSect
End Sub

Uninstall Accunting 2007 and it works fine again. Confirmed problem
with two
other people on different computers running Vista/Word 2007 and then
testing
VBA code before and after installing Acct 2007. The maco is meant to
unlink
all headers and footers in document from previous section.

Any ideas whats going wrong and why?
Shauna Kelly - 25 Oct 2007 01:44 GMT
Hi Berlie

I don't know what might be wrong, but if this were mine, I would replace
   For Each oSect In ActiveDocument.Range.Sections
with
   For Each oSect In ActiveDocument.Sections

In the (unlikely!) event that this fixes the problem, please let us know in
case other people have similar issues.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> Before installing Microsoft Accounting 2007 the following VBA code in
> Word 2007 under Vista worked fine. After installing it gives a Command
[quoted text clipped - 21 lines]
>
> Any ideas whats going wrong and why?
Berlie - 25 Oct 2007 04:15 GMT
Thanks for your reply.

I tried the code change you suggested first without Accounting
installed and it worked fine.
I then reinstalled Accounting and got the Command Not Available error
again.
Debug showed the:
 oSect.Headers(i).LinkToPrevious = False
line highlighted.

I have also tried various other means of unlinking headers and footers
in a macro and always get the error on the .LinkToPrevious = False
line when Accounting is installed.

Kim

On Oct 24, 8:44 pm, "Shauna Kelly"
<ShaunaKe...@SendNoSpamToShaunaKelly.com> wrote:
> Hi Berlie
>
[quoted text clipped - 37 lines]
>
> - Show quoted text -
Berlie - 30 Oct 2007 00:06 GMT
With further testing it seems to be related to the Paypal add-in that
installs with Accounting. If I only remove the Paypal add-in and not
the entire Accounting program it works fine again.

/shrug

Kim

> Thanks for your reply.
>
[quoted text clipped - 62 lines]
>
> - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.