none
"Macros in this project are disabled..." error message when creating PDF files RRS feed

  • Question

  • The following error occurs when creating a PDF file using a document that was created from a MS Word 2007 templates.

     "Macros in this project are disabled..."

    The security settings are set appropriately - it's not that.  I have done everything I can think of including asking Microsoft; they say it's not them.  It may not be, but I do not know how to get around it.  It did not happen before upgrading my templates to the Office 2007 format.

    Has this happened to anyone else?  There is no coding within th etemplates regartding PDFs.  We are uding both Adobe Professional X as well as PDF Nuance.

    Thanks in advance.


    peonysmiles

    Tuesday, October 30, 2012 10:26 PM

All replies

  • Hi peonysmiles,

    Thanks for posting in the MSDN Forum.

    Would you please provide your code snippet for further research?

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, October 31, 2012 6:35 AM
    Moderator
  • There are 11 templates.  I've included code from one (1). 

    I cannot place them all here.  We run in a Windows 7 OS (64-bit) , with Office 2007.  There isn't anything in the templates that creates PDF files.  We use either Adobe Pro or PDF Nuance to create PDF files.  That is when the error occurs.  It began once we converted the templates to 2007 format.  We paid a MS Partner to do it.  Of course now they want more money. 

    (1) The user creates a Word 2007 doument based on a template.  The document is saved to a location.  It now has a *.docx extension.

    (2) Go to the Adobe tab and click 'Create PDF'.  It creates the file, but also gives the error.

    (3) The error does not happen if we use Word 2007 native Create PDF or XPS.  So, I do not know why this is not working now.

    Option Explicit
    
    Private fFormCompleted As Boolean
    
    Public gstrDate As String
    Public gstrDateVisited As String
    Public gstrProjectNum As String
    Public gstrPlace As String
    Public gstrParticipants As String
    Public gstrDistribution As String
    Public gstrProjectName As String
    Public gstrFaxNumber As String
    Public gstrPreparedBy As String
    Public gstrclosing As String
    Public lngRecordCount As Long
    Public i As Integer
    
    Private Sub cmdOK_Click()
    
        On Error GoTo ErrHandler
        
        Dim ret As Boolean
        Dim temp As String
        
        ret = main.VerifyFaxNumber(cboRGVFax)
        If ret = False Then Exit Sub
        
        Application.ScreenUpdating = False
        
        ret = Functions.InitialValues()
        
        'Verify the date.
        ret = main.VerifyDate(txtDate)
        If ret Then
            gstrDate = Format(txtDate.Text, "mmmm d, yyyy")
        Else
            Exit Sub
        End If
        
        ret = main.VerifyDate(txtDateVisited)
        If ret Then
            gstrDateVisited = Format(txtDateVisited.Text, "mmmm d, yyyy")
        Else
            Exit Sub
        End If
        
        'Insert the optional information.
        ret = Functions.OptionalInformation(gstrDate, gstrProjectNum, gstrProjectName, _
              gstrPlace, gstrParticipants, gstrDistribution, gstrPreparedBy, gstrclosing, _
              gstrDateVisited)
        
        'Insert the company logo.
        ret = main.InsertLogo(mstrLogo)
        
          
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
              
         'Insert the Company closing
        Call main.AltB
        
        Selection.MoveDown Unit:=wdLine, Count:=9
        
        Application.ScreenUpdating = True
        
        Selection.GoTo What:=wdGoToBookmark, Name:="ProjectName"
        Selection.EndKey Unit:=wdStory  'd
        Selection.InsertBreak Type:=wdPageBreak
        
        'Insert the company logo on the 2nd page.
        ret = main.InsertLogo(mstrLogo2)
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
        
          
        'Delete the 2nd page from the active document.
    
        ret = main.DeleteSecondPage()  
        
        fFormCompleted = True
        
        Unload Me
        Exit Sub
    
    '############################
    ErrHandler:
    '############################
    
    FunctionName = "RGVMeetingNotes.MeetingNotes.cmdOK_Click"
    strmsg = ""
    
    Call main.ErrorHandler(FunctionName, strmsg)
    
    fFormCompleted = False
    Application.ScreenUpdating = True
    Unload Me
    
    Private Sub txtDateVisited_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
        
        On Error GoTo ErrHandler
        
        txtDateVisited.Text = Format(Now(), "mmmm d, yyyy")
        
        Exit Sub
    
    '############################
    ErrHandler:
    '############################
    
    FunctionName = "RGVMeetingNotes.MeetingNotes.txtDateVisited"
    strmsg = ""
    
    Call main.ErrorHandler(FunctionName, strmsg)
    
    End Sub
    
    Private Sub txtPreparedBy_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
        
        On Error GoTo ErrHandler
        
        txtPreparedBy.Text = main.GetUserInfo
    
        Exit Sub
        
    '############################
    ErrHandler:
    '############################
    
    FunctionName = "RGVMeetingNotes.MeetingNotes.txtPreparedBy_DblClick"
    strmsg = ""
    
    Call main.ErrorHandler(FunctionName, strmsg)
    
    End Sub
    
    Private Sub UserForm_Initialize()
        On Error GoTo ErrHandler
        
        Dim ret As Boolean
        Dim sSQL As String
        
        fFormCompleted = False
        
        txtDate.Text = Format(Now(), "mmmm d, yyyy")
        txtPlace.SetFocus
    
        
        ret = main.GetOffice
            
        'Load the fax numbers into the combo box.
        ret = main.LoadFaxNumbers(cboRGVFax)
        
        ret = main.GetStrings()
        
        'Load the office information.
        ret = main.LoadOfficeInfo()
     
        Exit Sub
            
    '############################
    ErrHandler:
    '############################
    
    FunctionName = "RGVMeetingNotes.MeetingNotes.UserForm_Initialize"
    strmsg = ""
    
    Call main.ErrorHandler(FunctionName, strmsg)
    
    fFormCompleted = False
    Application.ScreenUpdating = True
    
    End Sub

     


    peonysmiles

    Wednesday, October 31, 2012 10:12 AM
  • One thing I just noticed, our templates get the follwoing message when we go to save as a PDF using Adobe:

    Acrobat PDFMAker needs to save the file before continuing.  Do you want PDFMaker to save the file and continue? 

    This question does not occur with documents created by templates made by MS.  I have already saved the file.  It has a *.docx extension. 

    peonysmiles

    Wednesday, October 31, 2012 10:37 AM
  • Hi peonysmiles,

    I will involve some experts into your issue to see whether they can help you. There might be some time delay, thanks for you patience.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, November 5, 2012 5:34 AM
    Moderator
  • Hi Peoniessmiles,

    Thanks for sending us your question.  You mentioned the following:
    (2) Go to the Adobe tab and click 'Create PDF'.  It creates the file, but also gives the error.
    (3) The error does not happen if we use Word 2007 native Create PDF or XPS.  So, I do not know why this is not working now.

    Someone on the forums may be able to provide you an alternative answer, however if the issue is only happening when using the Adobe tab than it is an issue with the Adobe add-in.

    I did some searching on the Adobe support site below and was unable to find anything related to this specific issue.
    http://helpx.adobe.com/support/

    My first recommendation would be to make sure you have any updates for the Adobe add-in that may be available.  You may also want to contact Adobe directly to see if they are aware of this issue and whether they have any recommendations for you.

    Travis Oelschlager
    Microsoft Online Community Support

    Monday, November 5, 2012 8:40 PM
  • Hi,

    IT also happend with PDF Nuance.  I have already contected Adobe.  They say the issue is with Microsoft not them.  I have all updates.  We've actually moved on to version XI now and still have the same problem.

    So, I have no idea.


    peonysmiles

    Tuesday, November 6, 2012 12:12 PM
  • Hi Peonysmiles,

    I have a few things you can try to see if they help at all.
    1) If you have both of the add-ins installed for PDF Nuance and Adobe it is possible they could be conflicting and causing the issue. Does the issue happen if you uninstall one of those add-ins?
    2) Based on your description this is only happening with the 3rd party templates that have VBA code behind them.  You can also try the following settings in excel to see if they change the behavior:
    - Go to the Office Button and choose word options.
    - Click the Trust Center and Trust Center Settings.
    - They can test the following settings:
    A) On the Macro settings tab, check the box for Trust access to the VBA project object model
    B) On the Macro setting tab, select the "Enable all macros" setting.
    C) On the ActiveX Settings tab, select the "Enable all controls without restrictions and without prompting"
    D) On the trusted locations tab, add a trusted location for the document and the document you are saving.

    Travis Oelschlager
    Microsoft Online Community Support

    Tuesday, November 6, 2012 10:02 PM
  • Travis -

    I too, get this error, do not have Nuance installed, only AA Pro 11

    Is there an update for this issue?

    Friday, October 4, 2013 2:39 PM