![]() |
|
|
|
#1
|
||||
|
||||
|
You need to show your code. I wouldn't expect that DDE is required if Excel is running the code because it is pushing the data rather than Word trying to pull it.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
#2
|
|||
|
|||
|
Here's the code for excel:
Code:
Sub Open_Word_Doc()
Dim WRD As Object
On Error Resume Next
Set WRD = GetObject(, "Word.Application")
If Err.Number Then
Err.Clear
Set WRD = CreateObject("Word.Application")
End If
WRD.Visible = True
WRD.Application.WindowState = wdWindowStateMaximize
WRD.Application.ScreenUpdating = True
WRD.Activate
WRD.Documents.Add Template:= _
"[Path to .dot file]", _
NewTemplate:=False
WRD.Selection.WholeStory
WRD.Selection.Fields.Update
WRD.Selection.HomeKey Unit:=wdStory
WRD.Application.ScreenUpdating = True
Set WRD = Nothing
End Sub
Code:
{Set "Width" "{DDE Excel "[Path to .xls file]" [Cell Name] \t \* mergeformat}"}
Code:
Sub AutoNew() Create_Reset_Variables CallUF End Sub Code:
Sub CallUF()
Dim oFrm As WrdFrm
Set oFrm = New WrdFrm
With oFrm
.Show
End With
Unload oFrm
Set oFrm = Nothing
lbl_Exit:
Exit Sub
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Could somebody help me with the code of my VBA userforms(Combibox - saving - editing of data) | 19339 | Excel Programming | 2 | 09-14-2018 12:06 AM |
| Is it possible to have menubar in userforms | srinivasaru | Excel Programming | 3 | 03-22-2017 03:53 AM |
| using office icons on userforms controls | fraz627 | Excel | 0 | 05-02-2014 06:02 PM |
Multiple Userforms Displaying Different Content but Returning Same Content?
|
marksm33 | Word VBA | 1 | 02-24-2014 06:17 PM |
looping controls on userforms
|
Cbrehm | Excel Programming | 5 | 05-11-2011 02:53 AM |