Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2007 VB macro issue

Status
Not open for further replies.

Hof

MIS
Mar 27, 2002
99
SE
Hi
We have an issue in Citrix Presentation server 4.5 with a Microsoft Word template that is causing problems in Word 2007 after our upgrade to Office 2007. The problem occurs with all documents (10s of thousands) that have been created from a specific template that contains an AutoOpen VB macro. If macros are enabled you get the following error message when the document is opened:

Microsoft Visual Basic
The setting could not be created

If you click OK in this message the document is opened and you can edit header and footer and manually update the fields but it is very annoying that everyone gets this message.

The problem does occur in the following situations:
1. If I open one of the documents logged on with my normal domain user account as well as for the users.
2. If I open a document logged on with a normal domain user account even if have made that account admin on the Citrix Server.
3. If I open a document logged on with a normal domain user account even if have excluded that account from the Citrix server GPO.
4. If I open a document logged on with a normal domain user account even if have deleted the user profile for that account.


The problem does NOT occur in the following situations:

1. Log on to the server with my admin account and open the document. This account is not a member of the domain admins group it is only a Citrix administrator account.
2. Log on to the server with a newly created server local administrator account and open a document.
3. log on to the server with a newly created server local normal user account and open a document.


The main function of this macro is to update all fields in the document (mostly in header and footer) when the document is opened.

I am not a VB scripting guy but we have been able to see that the error occurs when the following command line in the VB macro is executed:

Application.Options.UpdateLinksAtOpen = False

If I open the macro in edit mode and run it from there the error message is a bit different:

Microsoft Visual Basic
Run-time error '5416':
The setting could not be created


Since it does not seem to matter whether you are running this as an admin or a normal user we suspect that this is caused by some GPO or other setting that is outside of our control. The problem is that we cannot figure out what type of setting that could cause this type of error and I have searched the web without finding any tips that help. If anyone has an idea that could help us solve this we would be very grateful.
Thanks in advance
BR
/Mats
 
This is something I have read; so, no first hand experience. Try turning off Autorecover function on your system.

I don't particularly care about apathy
 
It does seem to have something to do with AutoRecover in that if there is no path, this error occurs. It also appears to have something to do with Group Policies. If you google Run-time error '5416', there are a number of links regarding this for 2007, and some out-of-my-league admin tools to possibly use. Including this one from Microsoft....

"Group Policy Administrative Template files and Office Customization Tool OPA files for use with the 2007 Microsoft Office system programs"

Sheeesh.

Gerry
 
We have all the admin templates imported in our Citrix GPO but we haven't been able to figure out what settings that may be causing this since it does not seem to be the Citrix policy that is the problem. I have tried to go through the policy but there are more than a few settings to check. I have also found the tips about auto recover and had a brief look at that but it didn't seem to make any difference and also the auto recover issue occurred for a different VB command but I will check it again to make sure. Thanks for your answers so far.
/Hof
 
Sorry, Hof, my comment was really for Gerry. I know nothing of Citrix, and there are so many policies, I wouldn't know where to begin - if you remove all the policies (just rename the Policies registry key) do you still get the error? If so, it's a policy; if not, it's not!

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
I have now been able to temporarily move the server to an OU that is only affected by default domain policy in the root of the domain and when I do that it works so it seems that it is definitely a GPO that is causing this. I have also been able to create a GP Results report of all GPO settings that apply to the user account when logging on to this server. The problem is that I cannot see any settings that should affect this so I don't know where to start and I cannot change these policies since some of them are used to configure settings for thousands of users, besides I don't have the access either. This is why I was hoping that maybe someone could have an idea of what setting may be causing the problem. Well I'll just have to keep on testing. Thanks
 
This is now solved. It was actually caused by the autorecover setting in a GPO. The autorecover setting was enabled and the path H:\ was defined. Had to change this to an UNC path instead then it worked. Thanks for your tips.
/Hof

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top