'Enable / Disable' macro message 
Author Message
 'Enable / Disable' macro message

I have a custom form that is published to a public Outlook
folder in which everyone in the Global address book has
access to, and upon installing the application that
utilizes this form the following code is used as found on
Slipstick.com:

Sub RegisterOFT()
    Dim filename As String
    Dim Temp As String
    Dim endpos As Integer
    Dim mylength As Integer

    Set myOlApp = GetObject("", "Outlook.Application")
    ' retrieve Outlook Templates
    filename = Dir$(App.Path & "\*.oft", vbNormal)
    Do Until filename = ""
    mylength = Len(filename)
    ' strip off the extension from the filename. This will
be the name of the form.
    endpos = InStr(1, filename, ".oft", 1)
    strTemp = Trim(Mid(filename, 1, endpos - 1))
    ' publish all Outlook forms into the Personal Registry
    Set myItem = myOlApp.CreateItemFromTemplate(App.Path
& "\" & filename)
    Set myform = myItem.FormDescription
    myform.Name = strTemp
    myform.PublishForm olPersonalRegistry
    filename = Dir$
    Loop
End Sub

When creating a message with this custom form the user
does not receive the 'Enable/Disable' macro; however, when
the user receiving the message opens it they do.  The
message is created from the public Outlook folder and the
only users capable of recieving the message are those that
had the application installed; therefore, running the
above code.  I hope you can help!

Thanks,
Heidi



Sat, 03 Apr 2004 19:35:50 GMT  
 'Enable / Disable' macro message
Is the "Send form definition with item" box checked on the (Properties) page
of the form? Is there code behind the form that could be causing it to
"one-off"? See http://www.slipstick.com/dev/formpub.htm#oneoff.

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> I have a custom form that is published to a public Outlook
> folder in which everyone in the Global address book has
> access to, and upon installing the application that
> utilizes this form the following code is used as found on
> Slipstick.com:

> Sub RegisterOFT()
>     Dim filename As String
>     Dim Temp As String
>     Dim endpos As Integer
>     Dim mylength As Integer

>     Set myOlApp = GetObject("", "Outlook.Application")
>     ' retrieve Outlook Templates
>     filename = Dir$(App.Path & "\*.oft", vbNormal)
>     Do Until filename = ""
>     mylength = Len(filename)
>     ' strip off the extension from the filename. This will
> be the name of the form.
>     endpos = InStr(1, filename, ".oft", 1)
>     strTemp = Trim(Mid(filename, 1, endpos - 1))
>     ' publish all Outlook forms into the Personal Registry
>     Set myItem = myOlApp.CreateItemFromTemplate(App.Path
> & "\" & filename)
>     Set myform = myItem.FormDescription
>     myform.Name = strTemp
>     myform.PublishForm olPersonalRegistry
>     filename = Dir$
>     Loop
> End Sub

> When creating a message with this custom form the user
> does not receive the 'Enable/Disable' macro; however, when
> the user receiving the message opens it they do.  The
> message is created from the public Outlook folder and the
> only users capable of recieving the message are those that
> had the application installed; therefore, running the
> above code.  I hope you can help!

> Thanks,
> Heidi



Sat, 03 Apr 2004 19:52:00 GMT  
 'Enable / Disable' macro message
Sue,
It turns out that the "Send form definition with item" was
on.  I turned it off and saved the template again.  After
an install using the code I inserted earlier it works
fine; however when installing this line brings up
the 'Enable/Disable' macro message:

Set myItem = myOlApp.CreateItemFromTemplate(App.Path & "\"
& filename)

Is there any way to fix this.  Like I said, the template
no longer has the "Send form definition with item"
switched on.

Thanks!

Quote:
>-----Original Message-----
>Is the "Send form definition with item" box checked on

the (Properties) page
Quote:
>of the form? Is there code behind the form that could be
causing it to
>"one-off"? See

http://www.slipstick.com/dev/formpub.htm#oneoff.
Quote:

>--
>Sue Mosher, Outlook MVP
>   Outlook and Exchange Solutions
>   at http://www.slipstick.com


message

>> I have a custom form that is published to a public
Outlook
>> folder in which everyone in the Global address book has
>> access to, and upon installing the application that
>> utilizes this form the following code is used as found
on
>> Slipstick.com:

>> Sub RegisterOFT()
>>     Dim filename As String
>>     Dim Temp As String
>>     Dim endpos As Integer
>>     Dim mylength As Integer

>>     Set myOlApp = GetObject("", "Outlook.Application")
>>     ' retrieve Outlook Templates
>>     filename = Dir$(App.Path & "\*.oft", vbNormal)
>>     Do Until filename = ""
>>     mylength = Len(filename)
>>     ' strip off the extension from the filename. This
will
>> be the name of the form.
>>     endpos = InStr(1, filename, ".oft", 1)
>>     strTemp = Trim(Mid(filename, 1, endpos - 1))
>>     ' publish all Outlook forms into the Personal
Registry
>>     Set myItem = myOlApp.CreateItemFromTemplate(App.Path
>> & "\" & filename)
>>     Set myform = myItem.FormDescription
>>     myform.Name = strTemp
>>     myform.PublishForm olPersonalRegistry
>>     filename = Dir$
>>     Loop
>> End Sub

>> When creating a message with this custom form the user
>> does not receive the 'Enable/Disable' macro; however,
when
>> the user receiving the message opens it they do.  The
>> message is created from the public Outlook folder and
the
>> only users capable of recieving the message are those
that
>> had the application installed; therefore, running the
>> above code.  I hope you can help!

>> Thanks,
>> Heidi

>.



Sat, 03 Apr 2004 22:21:51 GMT  
 'Enable / Disable' macro message
If the template file has code, you will always get this message. The way to
avoid it is to use only published forms.

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> Sue,
> It turns out that the "Send form definition with item" was
> on.  I turned it off and saved the template again.  After
> an install using the code I inserted earlier it works
> fine; however when installing this line brings up
> the 'Enable/Disable' macro message:

> Set myItem = myOlApp.CreateItemFromTemplate(App.Path & "\"
> & filename)

> Is there any way to fix this.  Like I said, the template
> no longer has the "Send form definition with item"
> switched on.

> Thanks!

> >-----Original Message-----
> >Is the "Send form definition with item" box checked on
> the (Properties) page
> >of the form? Is there code behind the form that could be
> causing it to
> >"one-off"? See
> http://www.slipstick.com/dev/formpub.htm#oneoff.

> >--
> >Sue Mosher, Outlook MVP
> >   Outlook and Exchange Solutions
> >   at http://www.slipstick.com


> message

> >> I have a custom form that is published to a public
> Outlook
> >> folder in which everyone in the Global address book has
> >> access to, and upon installing the application that
> >> utilizes this form the following code is used as found
> on
> >> Slipstick.com:

> >> Sub RegisterOFT()
> >>     Dim filename As String
> >>     Dim Temp As String
> >>     Dim endpos As Integer
> >>     Dim mylength As Integer

> >>     Set myOlApp = GetObject("", "Outlook.Application")
> >>     ' retrieve Outlook Templates
> >>     filename = Dir$(App.Path & "\*.oft", vbNormal)
> >>     Do Until filename = ""
> >>     mylength = Len(filename)
> >>     ' strip off the extension from the filename. This
> will
> >> be the name of the form.
> >>     endpos = InStr(1, filename, ".oft", 1)
> >>     strTemp = Trim(Mid(filename, 1, endpos - 1))
> >>     ' publish all Outlook forms into the Personal
> Registry
> >>     Set myItem = myOlApp.CreateItemFromTemplate(App.Path
> >> & "\" & filename)
> >>     Set myform = myItem.FormDescription
> >>     myform.Name = strTemp
> >>     myform.PublishForm olPersonalRegistry
> >>     filename = Dir$
> >>     Loop
> >> End Sub

> >> When creating a message with this custom form the user
> >> does not receive the 'Enable/Disable' macro; however,
> when
> >> the user receiving the message opens it they do.  The
> >> message is created from the public Outlook folder and
> the
> >> only users capable of recieving the message are those
> that
> >> had the application installed; therefore, running the
> >> above code.  I hope you can help!

> >> Thanks,
> >> Heidi

> >.



Sat, 03 Apr 2004 23:08:39 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. disable the enable/disable macro message

2. Macros are disabled and can't re-enable

3. Problem removing the disable/enable macros message when a doc opens

4. disabling the DISABLE/ENABLE macros menu on opening spreadsheet

5. Removing the [ENABLE MACROS] [DISABLE MACROS] popup window

6. VB5 problem with enabling and disabling combo's when running exe

7. ComboBox Enabled Flag doesn't stay Disabled

8. Enable/Disable of CUT, COPY, PASTE Menu's/Toolbars

9. Enable/Disable of CUT, COPY, PASTE Menu's/Toolbars

10. Enable/Disable of CUT, COPY, PASTE Menu's/Toolbars

11. How to enable macro's?

12. I'd like to use word with all macros disabled *and* without getting annoying msg

 

 
Powered by phpBB® Forum Software