ms-publisher

Word/Publisher email merge issues

落爺英雄遲暮 提交于 2019-12-25 03:47:35
问题 I've been searching for days for an answer to this issue. I'm trying to append an Access field to a base URL to customize each email in my merge like so: http://www.example.com/myItems.asp?ItemID={field}. I tried several approaches in Word 2007, then gave up and finally tried Publisher after coming across this post - MS Word: Mailmerge hyperlinks with query get URL string with a MERGEFIELD. In Publisher, I got everything to merge properly including the custom links (according to preview), but

Object variable or With block variable not set (Error 91)

喜夏-厌秋 提交于 2019-12-17 09:56:50
问题 I have the following code: Sub AddSources() Dim pubPage As Page Dim pubShape As Shape Dim hprlink As Hyperlink Dim origAddress() As String Dim exportFileName As String exportFileName = "TestResume" Dim linkSource As String linkSource = "TestSource2" Dim hyperLinkText As TextRange For Each pubPage In ActiveDocument.Pages For Each pubShape In pubPage.Shapes If pubShape.Type = pbTextFrame Then For Each hprlink In pubShape.TextFrame.TextRange.Hyperlinks If InStr(hprlink.Address, "http://bleaney

How to enable Grow Text Box To Fit in MS Publisher using VBA

人走茶凉 提交于 2019-12-11 13:24:24
问题 Hi MS Publisher VBA programmers :-) What seems so simple is actually not documented. All I need to do is be able to insert text programmatically into a text box then have the text resize vertically expanding itself as I add more text. This works fine if I do it manually by inserting TextBox and choosing the "Grow Text Box To Fit" option in the Text Fit drop-down in the Format tab of the TextBox. This code doesn't work: Sub myGrowToFit() Set myTextBox = ActiveDocument.Pages(1).Shapes

Replacing Text in Microsoft Publisher Using Powershell

99封情书 提交于 2019-12-11 09:57:38
问题 My HR team asked if I could help them generate new business cards for all of our employees. They have a Publisher file and I am trying to replace the text in. I've written all the portions that pull the info from AD and the looping mechanism but I cannot get the text replacement to function. I've done something like this in Microsoft Word before using the Find.Execute Method from Word. That was straightforward as I just fed the method my arguments and it worked. This time though, I am trying

Find existing instance of Office Application

。_饼干妹妹 提交于 2019-11-29 16:04:10
Is there any way to get existing instance of MS Publisher as Microsoft.Office.Interop.Publisher.Application ? I've found this: System.Diagnostics.Process.GetProcessesByName("Microsoft Publisher") So I can check if this is already running, but how to convert it to MS Publisher application? So I can call Microsoft.Office.Interop.Publisher.Application.Open for e.g.? You could try this Microsoft getActiveObject . Here's an example. object word; try { word = System.Runtime.InteropServices.Marshal.GetActiveObject("Word.Application"); //If there is a running Word instance, it gets saved into the word

Find existing instance of Office Application

…衆ロ難τιáo~ 提交于 2019-11-28 09:46:59
问题 Is there any way to get existing instance of MS Publisher as Microsoft.Office.Interop.Publisher.Application ? I've found this: System.Diagnostics.Process.GetProcessesByName("Microsoft Publisher") So I can check if this is already running, but how to convert it to MS Publisher application? So I can call Microsoft.Office.Interop.Publisher.Application.Open for e.g.? 回答1: You could try this Microsoft getActiveObject. Here's an example. object word; try { word = System.Runtime.InteropServices

Object variable or With block variable not set (Error 91)

偶尔善良 提交于 2019-11-27 09:25:51
I have the following code: Sub AddSources() Dim pubPage As Page Dim pubShape As Shape Dim hprlink As Hyperlink Dim origAddress() As String Dim exportFileName As String exportFileName = "TestResume" Dim linkSource As String linkSource = "TestSource2" Dim hyperLinkText As TextRange For Each pubPage In ActiveDocument.Pages For Each pubShape In pubPage.Shapes If pubShape.Type = pbTextFrame Then For Each hprlink In pubShape.TextFrame.TextRange.Hyperlinks If InStr(hprlink.Address, "http://bleaney.ca") > 0 Then hyperLinkText = hprlink.Range origAddress = Split(hprlink.Address, "?source=") hprlink